MaterialInstance.AcquireMaterial(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.
Returns the first instantiated Material assigned to the renderer, similar to Renderer.material. If any owner is specified the instanced material(s) will not be released until all owners are released. When a material is no longer needed ReleaseMaterial should be called with the matching owner.
public UnityEngine.Material AcquireMaterial (UnityEngine.Object owner = default, bool instance = true);
member this.AcquireMaterial : UnityEngine.Object * bool -> UnityEngine.Material
Public Function AcquireMaterial (Optional owner As Object = Nothing, Optional instance As Boolean = true) As Material
Parameters
- owner
- UnityEngine.Object
An optional owner to track instance ownership.
- instance
- Boolean
Returns
UnityEngine.Material
The first instantiated Material.