Fix issues causing lights to flicker or disappear, and causing objects to not cast shadows.
Real-time lights and specular highlights are missing or flicker in the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary, and also cause objects to not cast shadows.
When you use the Forward rendering path, Unity converts pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary lights to more performant vertex lights when the number of pixel lights exceeds a certain value. This can result in flickering or disappearing lights in the scene.
Note: This limitation affects only the Built-in Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary and the Universal Render Pipeline (URP). When you use the High Definition Render Pipeline (HDRP), Unity doesn’t convert pixel lights to vertex lights.
To control the probability of Unity converting a light into a vertex light, you can adjust their Render Mode priority in the Light component property settings.
For lights of high importance, set its Render Mode to Important to reduce the probability of Unity converting the selected lights to vertex lights. When Render Mode is set to Auto, Unity will check the light’s intensity and its relative distance from the cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary before converting it.
Lights which have Render Mode set to Not Important will always be converted to vertex lights.
If you need many mixed or real-time lights in the scene, switch to a different rendering pathThe technique that a render pipeline uses to render graphics. Choosing a different rendering path affects how lighting and shading are calculated. Some rendering paths are more suited to different platforms and hardware than others. More info
See in Glossary that supports more lights.
If you’re using the Built-in Render Pipeline, follow these steps:
If you’re using the Universal Rendering pipeline (URP):
To mitigate pixel light limitations, use baked lightsLight components whose Mode property is set to Baked. Unity pre-calculates the illumination from Baked Lights before runtime, and does not include them in any runtime lighting calculations. More info
See in Glossary. Go to the Light component and set its Mode to Baked.