This script leaks material instances.
TCL987 opened this issue · comments
TCL987 commented
This script leaks material instances resulting in all materials being replaced by " (Instanced) (Instanced)" and all of the materials being broken when uploaded to VRChat.
Unity displays this message:
Instantiating material due to calling renderer.material during edit mode. This will leak materials into the scene. You most likely want to use renderer.sharedMaterial instead.
Snail commented
Okay, this should be updated. It wasn't reproducing for me but i switched from .materials to .sharedMaterials.