Search Issue Tracker
By Design
Votes
0
Found in
2021.3.30f1
2022.3.10f1
2023.1.15f1
2023.2.0b11
2023.3.0a7
Issue ID
UUM-52923
Regression
No
“Rendering Layers” are not changed in the Inspector window when using a script with “renderingLayerMask“ to change them
How to reproduce:
1. Open the user’s attached “renderingLayerMaskIssueProject.zip” project
2. Enter “SampleScene” Scene (Assets > Scenes)
3. In the Hierarchy window, select “Directional Light” GameObject
4. In the Inspector window, observe the selected layers in “Rendering Layers”
5. Go to Menu > Tools > Light Tool
6. Press the “Click Me” button
7. Observe the selected layers in “Rendering Layers”
Expected result: “Light Layer Default” and “Light Layer 2” are selected
Actual result: “Light Layer Default” and “Light Layer 1” are selected
Reproducible with: 2021.3.30f1, 2022.3.10f1, 2023.1.15f1, 2023.2.0b11, 2023.3.0a7
Reproduced on: macOS 13.5.2 (Intel)
Not reproducible on: No other environment tested
Notes:
- not reproducible with other properties
- if logging the renderingLayerMask, the value is correct
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
The rendering layers variable that is being modified is different one. Although I agree this is confusing, you can modify the Rendering Layer mask variable in the editor by accessing and setting it via `light.GetUniversalAdditionalLightData().renderingLayers`