Renderer
info
Renderer inherits from Component
General functionality for all renderers. Based on Unity Renderer
Members
Properties
Name | Description |
---|---|
Renderer .allowOcclusionWhenDynamic | Controls if dynamic occlusion culling should be performed for this renderer. |
Renderer .bounds | The bounding volume of the renderer (Read Only). |
Renderer .enabled | Makes the rendered 3D object visible if enabled. |
Renderer .forceRenderingOff | Allows turning off rendering for a specific component. |
Renderer .isPartOfStaticBatch | Has this renderer been statically batched with any other renderers? (Read-Only) |
Renderer .isVisible | Is this renderer visible in any camera? (Read Only) |
Renderer .lightmapIndex | The index of the baked lightmap applied to this renderer. (Read-Only) |
Renderer .lightmapScaleOffset | The UV scale & offset used for a lightmap. (Read-Only) |
Renderer .lightProbeProxyVolumeOverride | If set, the Renderer will use the Light Probe Proxy Volume component attached to the source GameObject. |
Renderer .lightProbeUsage | The light probe interpolation type. |
Renderer .localToWorldMatrix | Matrix that transforms a point from local space into world space (Read Only). |
Renderer .material | Returns the first instantiated Material assigned to the renderer. Modifying material will change the material for this object only. |
Renderer .materials | Returns all the instantiated materials of this object. |
Renderer .motionVectorGenerationMode | Specifies the mode for motion vector rendering. |
Renderer .probeAnchor | If set, Renderer will use this Transform's position to find the light or reflection probe. Otherwise the center of Renderer's AABB will be used. |
Renderer .realtimeLightmapIndex | The index of the realtime lightmap applied to this renderer. |
Renderer .realtimeLightmapScaleOffset | The UV scale & offset used for a realtime lightmap. |
Renderer .receiveShadows | Does this object receive shadows? |
Renderer .reflectionProbeUsage | Should reflection probes be used for this Renderer? |
Renderer .rendererPriority | This value sorts renderers by priority. Lower values are rendered first and higher values are rendered last. |
Renderer .renderingLayerMask | Determines which rendering layer this renderer lives on. |
Renderer .shadowCastingMode | Does this object cast shadows? |
Renderer .sharedMaterial | The shared material of this object. |
Renderer .sharedMaterials | All the shared materials of this object. |
Renderer .sortingLayerID | Unique ID of the Renderer's sorting layer. |
Renderer .sortingLayerName | Name of the Renderer's sorting layer. |
Renderer .sortingOrder | Renderer's order within a sorting layer. |
Renderer .worldToLocalMatrix | Matrix that transforms a point from world space into local space (Read Only). |
Methods
Name | Description |
---|---|
Renderer .GetMaterials() | Returns all the instantiated materials of this object. |
Renderer .GetPropertyBlock(materialIndex=-1) | Get per-Renderer or per-Material property block. |
Renderer .GetSharedMaterials() | Returns all the shared materials of this object. |
Renderer .HasPropertyBlock() | Returns true if the Renderer has a material property block attached via SetPropertyBlock. |
Renderer .SetPropertyBlock(properties, materialIndex=-1) | Lets you set or clear per-renderer or per-material parameter overrides. |
Inherited Members
Inherited Properties
Name | Description |
---|---|
Renderer .gameObject | The game object this component is attached to. A component is always attached to a game object. |
Renderer .tag | The tag of this game object. |
Renderer .transform | The Transform attached to this GameObject. |
Renderer .hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
Renderer .name | The name of the object. |
Inherited Methods
Name | Description |
---|---|
Renderer .BroadcastMessage(methodName, parameter=nil) | Calls the method named methodName on every Lua Script in this game object or any of its children. |
Renderer .CompareTag(tag) | Is this game object tagged with tag ? |
Renderer .GetAllLuaScripts() | Returns an array of all Lua scripts that attached to the game object. |
Renderer .GetComponent(type) | Returns the component of Type type if the game object has one attached, nil if it doesn't. |
Renderer .GetComponentInChildren(t) | Returns the component of Type type in the GameObject or any of its children using depth first search. |
Renderer .GetComponentInParent(t) | Returns the component of Type type in the GameObject or any of its parents. |
Renderer .GetComponents(type) | Returns all components of Type type in the GameObject. |
Renderer .GetComponentsInChildren(t) | Returns all components of Type type in the GameObject or any of its children. |
Renderer .GetComponentsInParent(t) | Returns all components of Type type in the GameObject or any of its parents. |
Renderer .SendMessage(methodName, value=nil) | Calls the method named methodName on every Lua Script in this game object. |
Renderer .SendMessageUpwards(methodName, value=nil) | Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour. |
Renderer .TryGetComponent(type) | Gets the component of the specified type, if it exists. |
Renderer .GetInstanceID() | Returns the instance id of the object. |
Extra Detail
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 , and the materials can be accessed and modified through them.