MaterialInstance.ReleaseMaterial(Object, Boolean) Method
Definition
Important
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)
Parameters
- owner
- UnityEngine.Object
The same owner which originally acquire ownership via AcquireMaterial(s).
- autoDestroy
- Boolean
When ownership count hits zero should the MaterialInstance component be destroyed?