Search Issue Tracker

By Design

Votes

0

Found in

5.3.4p1

Issue ID

788997

Regression

No

Material instance gets overridden when read

Shaders

-

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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.