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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment