UnityEssentials
Small but useful tools and features for Unity
Static Public Member Functions | List of all members
UnityEngine.MeshRendererExtensions Class Reference
Collaboration diagram for UnityEngine.MeshRendererExtensions:
Collaboration graph

Static Public Member Functions

static Material materialOfObject (this MeshRenderer meshRenderer)
 Returns the first instantiated Material assigned to the renderer. More...
 
static Material[] materialsOfObject (this MeshRenderer meshRenderer)
 Returns all the instantiated materials of this object. More...
 
static Material materialAsset (this MeshRenderer meshRenderer)
 The shared material of this object. More...
 
static Material[] materialsAsset (this MeshRenderer meshRenderer)
 The shared materials of this object. More...
 

Detailed Description

Definition at line 3 of file MeshRendererExtensions.cs.

Member Function Documentation

◆ materialAsset()

static Material UnityEngine.MeshRendererExtensions.materialAsset ( this MeshRenderer  meshRenderer)
static

The shared material of this object.

Any changes to this material will affect all elements linked to the original.

Will modify the asset.

Parameters
meshRenderer
Returns
The shared material of this object.

Definition at line 36 of file MeshRendererExtensions.cs.

◆ materialOfObject()

static Material UnityEngine.MeshRendererExtensions.materialOfObject ( this MeshRenderer  meshRenderer)
static

Returns the first instantiated Material assigned to the renderer.

Any changes to this material will duplicate the material and will not affect all elements linked to the original.

Will duplicate the material.

Parameters
meshRenderer
Returns
Returns the first instantiated Material assigned to the renderer.

Definition at line 12 of file MeshRendererExtensions.cs.

◆ materialsAsset()

static Material [] UnityEngine.MeshRendererExtensions.materialsAsset ( this MeshRenderer  meshRenderer)
static

The shared materials of this object.

Any changes to this materials will affect all elements linked to the originals.

Will modify the assets.

Parameters
meshRenderer
Returns
The shared materials of this object.

Definition at line 48 of file MeshRendererExtensions.cs.

◆ materialsOfObject()

static Material [] UnityEngine.MeshRendererExtensions.materialsOfObject ( this MeshRenderer  meshRenderer)
static

Returns all the instantiated materials of this object.

Any changes to this materials will duplicate the materials and will not affect all elements linked to the originals.

Will duplicate the materials.

Parameters
meshRenderer
Returns

Definition at line 24 of file MeshRendererExtensions.cs.


The documentation for this class was generated from the following file: