Search Issue Tracker
By Design
Votes
0
Found in
2018.2.14f1
Issue ID
1096295
Regression
No
Mutiple instances of same material created after accessing renderer.materials property
To reproduce:
1) Open attached project and scene
2) Play it
Note: Make sure you don't click game view for now
3) Select the cloned model -> Genesis -> MSDJodh...G.Shape in the hierarchy
Expected: Notice that it has 8 identical materials in the renderer in the inspector, and only one is shown after all the inspector elements
4) Click anywhere in Game View
5) Look back to Inspector
Actual: Now that single material is changed into 8 copies of instanced material
Reproduced in 2017.4.0f1, 2018.2.14f1, 2019.1.0a8
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
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Resolution Note:
User should use renderer.sharedMaterials instead of renderer.materials because once renderer.material or renderer.materials are called, material instances will be created.