Search Issue Tracker
By Design
Votes
0
Found in
2020.3.42f1
2021.3.15f1
2022.1.24f1
2022.2.1f1
2023.1.0a21
Issue ID
UUM-21610
Regression
No
[URP] Lights become realtime when copying and instantiating them using Instantiate()
Reproduction steps:
# Open the “InstantiateBugsStripped“ project
# Open the “Empty” scene
# Enter the Play Mode
# Press Window → Analysis → Frame Debugger
# In the top left corner of the Frame Debugger window press Enable
# Expand the “ScriptableRenderer.Execute: URP-HighFidelity-Renderer” section
# Select the “DrawOpaqueObjects” section
# Locate and observe the value of the “_MainLightColor” property
Expected result: the value of the _MainLightColor is (0,0,0,1)
Actual result: the value of the _MainLightColor is (2,1.559934,1.239042,2) (Slightly depends on different versions of the Editor)
Reproducible with: 10.10.1 (2020.3.42f1), 12.1.8 (2021.3.15f1), 13.1.9 (2022.1.24f1), 14.0.4 (2022.2.1f1), 15.0.2 (2023.1.0a21)
Reproduced on: Windows 10
Note:
1. Sometimes, due to an unknown reason after enabling Frame Debugger, it won’t show any values, the workaround for this issue would be just disabling and enabling the debugger again.
2. Although instantiated light is shown as baked in the Inspector, everything except the (0,0,0,1) value of “_MainLightColor” property indicates that light is realtime
3. Couldn’t test the same behavior with HDRP (Frame Debugger doesn’t show _MainLightColor property)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Sprite Renderer image is changed when switching Mask Interaction and changing Sprite to a shared Sprite
- An unsigned integer is not compared with an integer correctly in player when using IL2CPP backend
- Graphical artifacts are being rendered in Scenes that are loaded during run-time when GPU Resident Drawer is turned on
- Low FPS in the Game View when the Editor window loses focus
- Memory leak when a domain is reloaded on a Scene that uses HDRP's water simulation resources
Resolution Note:
When cloning the light with `Instantiate` the LightBakingOutput is not cloned as this is unique for the particular light in the bake. If you want to clone the light fully, you will need to separately copy across `LightBakingOutput`. It is available on the Light component as `bakingOutput`.
We are aiming to make a larger refactor of how baking data is handled in the future and this will involve fixing this kind of workflow. For now the baking output on renderers and lights needs to be manually cloned.