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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment