Instance. Release Material(Object, Boolean) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Relinquishes ownership of a material instance. This should be called when a material is no longer needed after acquire ownership with AcquireMaterial(s).
public void ReleaseMaterial (UnityEngine.Object owner, bool autoDestroy = true);
member this.ReleaseMaterial : UnityEngine.Object * bool -> unit
Public Sub ReleaseMaterial (owner As Object, Optional autoDestroy As Boolean = true)
The same owner which originally acquire ownership via AcquireMaterial(s).
When ownership count hits zero should the MaterialInstance component be destroyed?