Modern 2D LightRays
Modern 2D LightRays

Upgrade & Troubleshooting

Move from the original release to the current renderer while preserving authored scene data.

Unity 2021.3 → 6.7+URP 2DPixel ArtLight2D

Upgrading from the original version

The main LightRays2D, settings, quad and particle script GUIDs are preserved. Existing scenes and prefabs keep their serialized ray settings, quad coordinates, sorting values and original particle mode values.

Recommended upgrade flow

Back up or commit your project before importing the update.
Import the new Modern2DLightRays folder over the previous asset.
Open representative scenes and confirm ray shape, sorting and Light2D behavior.
Use Tools → Light Rays 2D → Upgrade → Remove Old Opaque Cameras to remove the old generated camera objects.
Save scenes after checking the visual result.

Old OpaqueCamera objects

The previous release could create a child camera named OpaqueCamera. The compatibility component remains so old scenes do not show a Missing Script. It disables that old camera and no longer creates or renders a scene texture. The Upgrade menu removes only loaded scene objects named OpaqueCamera that carry the old component.

Original particles

The original particle enum values are unchanged:

0Surface
1Surface Climbing
2Top Falling
3Bottom Climbing
4Dust Motes (new)

Light2D compatibility

The original checkbox behavior is retained: it creates/removes a Freeform Light2D and keeps its perimeter synced. The newer appearance controls are opt-in through Sync Appearance.

Custom materials from the old Shader Graph

The standard Light Rays 2D material keeps its original asset reference and upgrades with the package. Materials that you duplicated or created yourself from the old internal Shader Graph are not part of the serialized component data; recreate those custom materials with the current Light Rays 2D setup if you still use them.

Troubleshooting

IssueCheck
Ray is invisibleIntensity, Sorting Layer/Order, GameObject scale, and a suitable Blend Mode.
Pink materialConfirm the project uses URP and the 2D Renderer, then reimport the Shaders folder.
Light2D does not light spritesUse Lit Sprite materials and confirm the Light2D target sorting layers / blend style in your 2D Renderer setup.
Dust is invisibleEnable Particles, choose Dust Motes, raise Density, and check particle color alpha.
Old OpaqueCamera still existsRun the Upgrade menu command after opening the scene.
Before publishing a game update: test one project in your minimum supported editor and one in your current production editor, especially if your project has custom Renderer Data or modified URP packages.