pub struct Renderer {Show 14 fields
pub m_CastShadows: bool,
pub m_Enabled: bool,
pub m_GameObject: PPtr,
pub m_LightmapIndex: u8,
pub m_LightmapTilingOffset: Vector4f,
pub m_Materials: Vec<PPtr>,
pub m_ReceiveShadows: bool,
pub m_StaticBatchRoot: PPtr,
pub m_SubsetIndices: Vec<u32>,
pub m_LightProbeAnchor: Option<PPtr>,
pub m_SortingLayer: Option<i16>,
pub m_SortingLayerID: Option<u32>,
pub m_SortingOrder: Option<i16>,
pub m_UseLightProbes: Option<bool>,
}Expand description
Renderer is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: General functionality for all renderers. A renderer is what makes an object appear on the screen. Use this class to access the renderer of any object, mesh or Particle System. Renderers can be disabled to make objects invisible (see enabled), and the materials can be accessed and modified through them (see material).See Also: Renderer components for meshes, particles, lines and trails.
Fields§
§m_CastShadows: bool§m_Enabled: boolMakes the rendered 3D object visible if enabled.
m_GameObject: PPtrThe game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject>: (3.4.0 - 4.7.2)
m_LightmapIndex: u8The index of the baked lightmap applied to this renderer.
m_LightmapTilingOffset: Vector4f§m_Materials: Vec<PPtr>Returns all the instantiated materials of this object.
Vec<PPtr<Material>>: (3.4.0 - 4.7.2)
m_ReceiveShadows: boolDoes this object receive shadows?
m_StaticBatchRoot: PPtrPPtr<Transform>: (3.4.0 - 4.7.2)
m_SubsetIndices: Vec<u32>§m_LightProbeAnchor: Option<PPtr>PPtr<Transform>: (3.5.0 - 4.7.2)
m_SortingLayer: Option<i16>i16: (4.3.0 - 4.3.4)
m_SortingLayerID: Option<u32>Unique ID of the Renderer’s sorting layer. u32: (4.5.0 - 4.7.2)
m_SortingOrder: Option<i16>Renderer’s order within a sorting layer. i16: (4.3.0 - 4.7.2)
m_UseLightProbes: Option<bool>bool: (3.5.0 - 4.7.2)