Skip to content

API > Renderer


Renderer⚓︎

Renderer inherits from Component

General functionality for all renderers. Based on Unity Renderer

Members⚓︎

Properties⚓︎

Name Description
Renderer.allowOcclusionWhenDynamicProperty Controls if dynamic occlusion culling should be performed for this renderer.
Renderer.boundsProperty The bounding volume of the renderer (Read Only).
Renderer.enabledProperty Makes the rendered 3D object visible if enabled.
Renderer.forceRenderingOffProperty Allows turning off rendering for a specific component.
Renderer.isPartOfStaticBatchProperty Has this renderer been statically batched with any other renderers? (Read-Only)
Renderer.isVisibleProperty Is this renderer visible in any camera? (Read Only)
Renderer.lightmapIndexProperty The index of the baked lightmap applied to this renderer. (Read-Only)
Renderer.lightmapScaleOffsetProperty The UV scale & offset used for a lightmap. (Read-Only)
Renderer.lightProbeProxyVolumeOverrideProperty If set, the Renderer will use the Light Probe Proxy Volume component attached to the source GameObject.
Renderer.lightProbeUsageProperty The light probe interpolation type.
Renderer.localToWorldMatrixProperty Matrix that transforms a point from local space into world space (Read Only).
Renderer.materialProperty Returns the first instantiated Material assigned to the renderer. Modifying material will change the material for this object only.
Renderer.materialsProperty Returns all the instantiated materials of this object.
Renderer.motionVectorGenerationModeProperty Specifies the mode for motion vector rendering.
Renderer.probeAnchorProperty 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.realtimeLightmapIndexProperty The index of the realtime lightmap applied to this renderer.
Renderer.realtimeLightmapScaleOffsetProperty The UV scale & offset used for a realtime lightmap.
Renderer.receiveShadowsProperty Does this object receive shadows?
Renderer.reflectionProbeUsageProperty Should reflection probes be used for this Renderer?
Renderer.rendererPriorityProperty This value sorts renderers by priority. Lower values are rendered first and higher values are rendered last.
Renderer.renderingLayerMaskProperty Determines which rendering layer this renderer lives on.
Renderer.shadowCastingModeProperty Does this object cast shadows?
Renderer.sharedMaterialProperty The shared material of this object.
Renderer.sharedMaterialsProperty All the shared materials of this object.
Renderer.sortingLayerIDProperty Unique ID of the Renderer's sorting layer.
Renderer.sortingLayerNameProperty Name of the Renderer's sorting layer.
Renderer.sortingOrderProperty Renderer's order within a sorting layer.
Renderer.worldToLocalMatrixProperty Matrix that transforms a point from world space into local space (Read Only).

Methods⚓︎

Name Description
Renderer.GetMaterials() Method Returns all the instantiated materials of this object.
Renderer.GetPropertyBlock(materialIndex=-1) Method Get per-Renderer or per-Material property block.
Renderer.GetSharedMaterials() Method Returns all the shared materials of this object.
Renderer.HasPropertyBlock() Method Returns true if the Renderer has a material property block attached via SetPropertyBlock.
Renderer.SetPropertyBlock(properties, materialIndex=-1) Method Lets you set or clear per-renderer or per-material parameter overrides.

Inherited Members⚓︎

Inherited Properties⚓︎

Name Description
Renderer.gameObjectPropertyReadonly Property The game object this component is attached to. A component is always attached to a game object.
Renderer.tagPropertyReadonly Property The tag of this game object.
Renderer.transformPropertyReadonly Property The Transform attached to this GameObject.
Renderer.hideFlagsProperty Should the object be hidden, saved with the Scene or modifiable by the user?
Renderer.nameProperty The name of the object.

Inherited Methods⚓︎

Name Description
Renderer.BroadcastMessage(methodName, parameter=nil)Method Calls the method named methodName on every Lua Script in this game object or any of its children.
Renderer.CompareTag(tag)Method Is this game object tagged with tag ?
Renderer.GetAllLuaScripts()Method Returns an array of all Lua scripts that attached to the game object.
Renderer.GetComponent(type)Method Returns the component of Type type if the game object has one attached, nil if it doesn't.
Renderer.GetComponentInChildren(t)Method Returns the component of Type type in the GameObject or any of its children using depth first search.
Renderer.GetComponentInParent(t)Method Returns the component of Type type in the GameObject or any of its parents.
Renderer.GetComponents(type)Method Returns all components of Type type in the GameObject.
Renderer.GetComponentsInChildren(t)Method Returns all components of Type type in the GameObject or any of its children.
Renderer.GetComponentsInParent(t)Method Returns all components of Type type in the GameObject or any of its parents.
Renderer.SendMessage(methodName, value=nil)Method Calls the method named methodName on every Lua Script in this game object.
Renderer.SendMessageUpwards(methodName, value=nil)Method Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour.
Renderer.TryGetComponent(type)Method Gets the component of the specified type, if it exists.
Renderer.GetInstanceID()Method 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.