MaterialInstance.AcquireMaterials(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 all the instantiated materials of this object, similar to Renderer.materials. 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[] AcquireMaterials (UnityEngine.Object owner = default, bool instance = true);
member this.AcquireMaterials : UnityEngine.Object * bool -> UnityEngine.Material[]
Public Function AcquireMaterials (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
Should this acquisition attempt to instance materials?
Returns
All the instantiated materials.