편집

다음을 통해 공유


MaterialInstance.AcquireMaterial(Object, Boolean) Method

Definition

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.

Applies to