theepicsnail / AvatarProfiler

VRChat avatar profiler plugin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This script leaks material instances.

TCL987 opened this issue · comments

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.

commented

Okay, this should be updated. It wasn't reproducing for me but i switched from .materials to .sharedMaterials.