Search Issue Tracker
By Design
Votes
0
Found in
6000.0.56f1
6000.2.2f1
6000.3.0a6
6000.4.0a1
Issue ID
UUM-115990
Regression
Yes
GameObjects are not updating when Materials and Cubemaps are updated from Environmental Reflections
How to reproduce:
1. Open the attached "IN-112669_URP Enviro" Project
2. Open the "Sample_URP" Scene (Assets/Enviro 3 - Sky and Weather/Sample/Scene)
3. Expand the "Enviro_3" GameObject
4. Select the Global Reflection Probe
5. Enter Play mode
6. Observe the Game View and the Inspector
Expected result: GameObjects are updating like the Global Reflection Probe
Actual result: GameObjects are not updating, unlike the Global Reflection Probe
Reproducible with: 2023.1.0a20 (be935afddb32), 6000.0.56f1, 6000.2.2f1, 6000.3.0a6
Not reproducible with: 2023.1.0a19
Reproducible on: Windows 11 Pro (24H2)
Not reproducible on: No other environments tested
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
This is by design. When using Forward+ in URP, we write reflection probe cubemaps into a global atlas. Whenever a reflection probe cubemap is written to on the GPU, URP needs to be notified, so that it can write the updated data into the atlas. To do this efficiently, the Texture.updateCount mechanism is used. It is up to the user to call Texture.IncrementUpdateCount() after updating a cubemap, as per the documentation: "Note: If you perform an update from the GPU side, you should increment the counter yourself. (For instance, when blitting into a RenderTexture). (see IncrementUpdateCount)."
Concretely, here's how the issue can be fixed in the attached project: In the EnviroReflectionProbe.cs script, at line 447, add a function call like so:
`myProbe.customBakedTexture.IncrementUpdateCount();`, right below where `myProbe.customBakedTexture` is assigned.
Relevant documentation:
https://docs.unity3d.com/ScriptReference/Texture-updateCount.html
https://docs.unity3d.com/ScriptReference/Texture.IncrementUpdateCount.html