Search Issue Tracker
By Design
Votes
0
Found in
5.3.4p1
Issue ID
788997
Regression
No
Material instance gets overridden when read
How to reproduce:
1. Open attached project
2. Open the scene Scenes/Main.unity
3. Play the scene
- Note the cube appears red, even though it should have a different texture
- By opening the script Scripts/AssignTextureAtRuntime.cs and commenting out Line 28, the issue is fixed (the cube gains a texture)
- Reproduced in Version 5.4.0b15 (2e995a1aa11c), Version 5.3.4f1 (fdbb5133b820), Version 5.3.4p3 (b902ad490cea), Version 5.0.4f1 (1d75c08f1c9c)
- By Design: The behaviour, where the reference to a material that is assined via the array isn't the same as the one one gets out when querying it again, has been in place since at least 5.0 (based on the code and behaviour) and is expected to be as such.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] The Player freezes when disabling Bluetooth while connected to the headphones
- Addressable bundles are not retrieved from the cache when a WebGL Player is refreshed
- Sprites are incorrectly occluded by Sprite Physics Shape culling when behind in sorting order
- CPU usage is increased when the Editor is idle with the ProBuilder Package installed
- Unstable lighting when additional light sources are added in Shader Graph nodes
Add comment