Copyright © 2026 Unity Technologies
Selecting the main light from directional lights is determined by UniversalRenderPipeline.GetMainLightIndex. The priority is whether the light is sun or not, then brightness. Currently, the main light is fixed as the first directional light in the scene lighting settings. Lighting Window > Environment > Sun Source > Directional Light When Sun Source is changed to None, the brighter Directional Light (1) is selected as the main light.
Selecting the main light from directional lights is determined by UniversalRenderPipeline.GetMainLightIndex. The priority is whether the light is sun or not, then brightness. Currently, the main light is fixed as the first directional light in the scene lighting settings. Lighting Window > Environment > Sun Source > Directional Light When Sun Source is changed to None, the brighter Directional Light (1) is selected as the main light.
Selecting the main light from directional lights is determined by UniversalRenderPipeline.GetMainLightIndex. The priority is whether the light is sun or not, then brightness. Currently, the main light is fixed as the first directional light in the scene lighting settings. Lighting Window > Environment > Sun Source > Directional Light When Sun Source is changed to None, the brighter Directional Light (1) is selected as the main light.
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “JapaneseAlley/Scenes/Demo_Day” Scene
3. Select the “Directional Light (1)” in the Hierarchy window
4. Change the “Rotation Y” value under “Transform” component in the Inspector window
5. Observe the Game View
Expected result: The shadows react to the changing of second “Directional Light”
Actual result: The shadows do not change and only render according to the first “Directional Light”
Reproducible with: 2021.3.40f1, 2022.3.36f1, 6000.0.9f1
Reproducible on: Windows 10, macOS Darwin 23.5.0 (User)
Not reproducible on: No other environment tested
Issues you vote on will appear here