SMeshRenderer
Last updated
Last updated
Sinespace® is a registered trademark of Sine Wave Entertainment Ltd, All Rights Reserved.
bool IsVisible get
Returns true if the renderer is visible on any camera. Note that the object is considered visible when it needs to be rendered in the Scene. For example, it might not actually be visible by any camera but still need to be rendered for shadows. When running in the editor, the Scene view cameras will also cause this value to be true.
bool Enabled get
set
Makes the rendered 3D object visible if enabled.
Returns the first instantiated Material assigned to the renderer.
Modifying material will change the material for this object only.
If the material is used by any other renderers, this will clone the shared material and start using it from now on.
The shared material of this object.
Modifying sharedMaterial will change the appearance of all objects using this material, and change material settings that are stored in the project too.
It is not recommended to modify materials returned by sharedMaterial. If you want to modify the material of a renderer use material instead.
Returns all the instantiated materials of this object.
This is an array of all materials used by the renderer. Unity supports a single object using multiple materials; in this case materials contains all the materials. sharedMaterial and material properties return the first used material if there is more than one.
Modifying any material in materials will change the appearance of only that object.
Note that like all arrays returned by Unity, this returns a copy of materials array. If you want to change some materials in it, get the value, change an entry and set materials back.
The shared material of this object.
Modifying sharedMaterial will change the appearance of all objects using this material, and change material settings that are stored in the project too.
It is not recommended to modify materials returned by sharedMaterial. If you want to modify the material of a renderer use material instead.
Property Description
Property Description
Material get
set
SharedMaterial get
set
[] Materials get
set
[] SharedMaterials get
set
BoundsMax get
BoundsMin get
bool IsVisible get
bool Enabled get
set
SMaterial Material get
set
SMaterial SharedMaterial get
set
SMaterial[] Materials get
set
SMaterial[] SharedMaterials get
set
SVector BoundsMax get
SVector BoundsMin get