Skip to main content

Renderer

info

Renderer inherits from Component

General functionality for all renderers. Based on Unity Renderer

Members

Properties

NameDescription
Renderer.allowOcclusionWhenDynamicControls if dynamic occlusion culling should be performed for this renderer.
Renderer.boundsThe bounding volume of the renderer (Read Only).
Renderer.enabledMakes the rendered 3D object visible if enabled.
Renderer.forceRenderingOffAllows turning off rendering for a specific component.
Renderer.isPartOfStaticBatchHas this renderer been statically batched with any other renderers? (Read-Only)
Renderer.isVisibleIs this renderer visible in any camera? (Read Only)
Renderer.lightmapIndexThe index of the baked lightmap applied to this renderer. (Read-Only)
Renderer.lightmapScaleOffsetThe UV scale & offset used for a lightmap. (Read-Only)
Renderer.lightProbeProxyVolumeOverrideIf set, the Renderer will use the Light Probe Proxy Volume component attached to the source GameObject.
Renderer.lightProbeUsageThe light probe interpolation type.
Renderer.localToWorldMatrixMatrix that transforms a point from local space into world space (Read Only).
Renderer.materialReturns the first instantiated Material assigned to the renderer. Modifying material will change the material for this object only.
Renderer.materialsReturns all the instantiated materials of this object.
Renderer.motionVectorGenerationModeSpecifies the mode for motion vector rendering.
Renderer.probeAnchorIf 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.realtimeLightmapIndexThe index of the realtime lightmap applied to this renderer.
Renderer.realtimeLightmapScaleOffsetThe UV scale & offset used for a realtime lightmap.
Renderer.receiveShadowsDoes this object receive shadows?
Renderer.reflectionProbeUsageShould reflection probes be used for this Renderer?
Renderer.rendererPriorityThis value sorts renderers by priority. Lower values are rendered first and higher values are rendered last.
Renderer.renderingLayerMaskDetermines which rendering layer this renderer lives on.
Renderer.shadowCastingModeDoes this object cast shadows?
Renderer.sharedMaterialThe shared material of this object.
Renderer.sharedMaterialsAll the shared materials of this object.
Renderer.sortingLayerIDUnique ID of the Renderer's sorting layer.
Renderer.sortingLayerNameName of the Renderer's sorting layer.
Renderer.sortingOrderRenderer's order within a sorting layer.
Renderer.worldToLocalMatrixMatrix that transforms a point from world space into local space (Read Only).

Methods

NameDescription
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

NameDescription
Renderer.gameObjectThe game object this component is attached to. A component is always attached to a game object.
Renderer.tagThe tag of this game object.
Renderer.transformThe Transform attached to this GameObject.
Renderer.hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
Renderer.nameThe name of the object.

Inherited Methods

NameDescription
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.