# CanvasRenderer

> A component that will render to the screen after all normal rendering has completed when attached to a Canvas. Designed for GUI application.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.UIModule
* **Inherits from:** [Component](/engine/6000.7/script-reference/unityengine/component.md)

```csharp
public sealed class CanvasRenderer : Component
```

## Remarks

Additional Resources: [Canvas](/engine/6000.7/script-reference/unityengine/canvas.md)

## Properties

| Property                                                                                                 | Description                                                                                                                                   |
| -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [absoluteDepth](/engine/6000.7/script-reference/unityengine/canvasrenderer/absolutedepth.md)             | Depth of the renderer relative to the root canvas.                                                                                            |
| [clippingSoftness](/engine/6000.7/script-reference/unityengine/canvasrenderer/clippingsoftness.md)       | The clipping softness to apply to the renderer.                                                                                               |
| [cull](/engine/6000.7/script-reference/unityengine/canvasrenderer/cull.md)                               | Indicates whether geometry emitted by this renderer is ignored.                                                                               |
| [cullTransparentMesh](/engine/6000.7/script-reference/unityengine/canvasrenderer/culltransparentmesh.md) | Indicates whether geometry emitted by this renderer can be ignored when the vertex color alpha is close to zero for every vertex of the mesh. |
| [hasMoved](/engine/6000.7/script-reference/unityengine/canvasrenderer/hasmoved.md)                       | True if any change has occured that would invalidate the positions of generated geometry.                                                     |
| [hasPopInstruction](/engine/6000.7/script-reference/unityengine/canvasrenderer/haspopinstruction.md)     | Enable 'render stack' pop draw call.                                                                                                          |
| [hasRectClipping](/engine/6000.7/script-reference/unityengine/canvasrenderer/hasrectclipping.md)         | True if rect clipping has been enabled on this renderer.                                                                                      |
| [materialCount](/engine/6000.7/script-reference/unityengine/canvasrenderer/materialcount.md)             | The number of materials usable by this renderer.                                                                                              |
| [popMaterialCount](/engine/6000.7/script-reference/unityengine/canvasrenderer/popmaterialcount.md)       | The number of materials usable by this renderer. Used internally for masking.                                                                 |
| [relativeDepth](/engine/6000.7/script-reference/unityengine/canvasrenderer/relativedepth.md)             | Depth of the renderer realative to the parent canvas.                                                                                         |

## Methods

| Method                                                                                                             | Description                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Clear](/engine/6000.7/script-reference/unityengine/canvasrenderer/clear.md)                                       | Remove all cached vertices.                                                                                                                                                                                         |
| [DisableRectClipping](/engine/6000.7/script-reference/unityengine/canvasrenderer/disablerectclipping.md)           | Disables rectangle clipping for this CanvasRenderer.                                                                                                                                                                |
| [EnableRectClipping](/engine/6000.7/script-reference/unityengine/canvasrenderer/enablerectclipping.md)             | Enables rect clipping on the CanvasRendered. Geometry outside of the specified rect will be clipped (not rendered).                                                                                                 |
| [GetAlpha](/engine/6000.7/script-reference/unityengine/canvasrenderer/getalpha.md)                                 | Get the current alpha of the renderer.                                                                                                                                                                              |
| [GetColor](/engine/6000.7/script-reference/unityengine/canvasrenderer/getcolor.md)                                 | Get the current color of the renderer.                                                                                                                                                                              |
| [GetInheritedAlpha](/engine/6000.7/script-reference/unityengine/canvasrenderer/getinheritedalpha.md)               | Get the final inherited alpha calculated by including all the parent alphas from included parent CanvasGroups.                                                                                                      |
| [GetMaterial](/engine/6000.7/script-reference/unityengine/canvasrenderer/getmaterial.md)                           | Gets the current [Material](/engine/6000.7/script-reference/unityengine/material.md) assigned to the CanvasRenderer.                                                                                                |
| [GetMesh](/engine/6000.7/script-reference/unityengine/canvasrenderer/getmesh.md)                                   | Returns the current mesh used to render the canvas content into.                                                                                                                                                    |
| [GetPopMaterial](/engine/6000.7/script-reference/unityengine/canvasrenderer/getpopmaterial.md)                     | Gets the current [Material](/engine/6000.7/script-reference/unityengine/material.md) assigned to the CanvasRenderer. Used internally for masking.                                                                   |
| [GetSecondaryTexture](/engine/6000.7/script-reference/unityengine/canvasrenderer/getsecondarytexture.md)           | Get the secondary texture at the specifed index.                                                                                                                                                                    |
| [GetSecondaryTextureCount](/engine/6000.7/script-reference/unityengine/canvasrenderer/getsecondarytexturecount.md) | Get the number of secondary textures usable by this renderer.                                                                                                                                                       |
| [GetSecondaryTextureName](/engine/6000.7/script-reference/unityengine/canvasrenderer/getsecondarytexturename.md)   | Get the shader property name of the secondary texture at the specifed index.                                                                                                                                        |
| [SetAlpha](/engine/6000.7/script-reference/unityengine/canvasrenderer/setalpha.md)                                 | Set the alpha of the renderer. Will be multiplied with the [UIVertex](/engine/6000.7/script-reference/unityengine/uivertex.md) alpha and the [Canvas](/engine/6000.7/script-reference/unityengine/canvas.md) alpha. |
| [SetAlphaTexture](/engine/6000.7/script-reference/unityengine/canvasrenderer/setalphatexture.md)                   | The Alpha Texture that will be passed to the Shader under the \_AlphaTex property.                                                                                                                                  |
| [SetColor](/engine/6000.7/script-reference/unityengine/canvasrenderer/setcolor.md)                                 | Set the color of the renderer. Will be multiplied with the [UIVertex](/engine/6000.7/script-reference/unityengine/uivertex.md) color and the [Canvas](/engine/6000.7/script-reference/unityengine/canvas.md) color. |
| [SetMaterial](/engine/6000.7/script-reference/unityengine/canvasrenderer/setmaterial.md)                           | Set the material for the canvas renderer. If a texture is specified then it will be used as the 'MainTex' instead of the material's 'MainTex'.                                                                      |
| [SetMesh](/engine/6000.7/script-reference/unityengine/canvasrenderer/setmesh.md)                                   | Sets the Mesh used by this renderer. Note the Mesh must be read/write enabled.                                                                                                                                      |
| [SetPopMaterial](/engine/6000.7/script-reference/unityengine/canvasrenderer/setpopmaterial.md)                     | Set the material for the canvas renderer. Used internally for masking.                                                                                                                                              |
| [SetSecondaryTexture](/engine/6000.7/script-reference/unityengine/canvasrenderer/setsecondarytexture.md)           | Sets the secondary texture usable by this renderer at the specified index with the specified shader property name.                                                                                                  |
| [SetSecondaryTextureCount](/engine/6000.7/script-reference/unityengine/canvasrenderer/setsecondarytexturecount.md) | Set the number of secondary textures usable by this renderer. If the size is increased then the new data is initialized with default empty values.                                                                  |
| [SetTexture](/engine/6000.7/script-reference/unityengine/canvasrenderer/settexture.md)                             | Sets the texture used by this renderer's material.                                                                                                                                                                  |

## Static Methods

| Method                                                                                                     | Description                                                                                                                |
| ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [AddUIVertexStream](/engine/6000.7/script-reference/unityengine/canvasrenderer/adduivertexstream.md)       | Take the UIVertex stream and split it into the corresponding arrays (positions, colors, uv0s, uv1s, normals and tangents). |
| [CreateUIVertexStream](/engine/6000.7/script-reference/unityengine/canvasrenderer/createuivertexstream.md) | Convert a set of vertex components into a stream of UIVertex.                                                              |
| [SplitUIVertexStreams](/engine/6000.7/script-reference/unityengine/canvasrenderer/splituivertexstreams.md) | Given a list of UIVertex, split the stream into its component types.                                                       |

## Static Events

| Member                                                                                             | Description                                                                                                                                                                            |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [onRequestRebuild](/engine/6000.7/script-reference/unityengine/canvasrenderer/onrequestrebuild.md) | (Editor Only) Event that gets fired whenever the data in the [CanvasRenderer](/engine/6000.7/script-reference/unityengine/canvasrenderer.md) gets invalidated and needs to be rebuilt. |

## Inheritance

**Inherited Members:**

* [Component.GetComponent(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponent.md#getcomponent\(type\))
* [Component.GetComponent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponent.md)
* [Component.TryGetComponent(Type, Component)](/engine/6000.7/script-reference/unityengine/component/trygetcomponent.md)
* [Component.TryGetComponent\<T>(T)](/engine/6000.7/script-reference/unityengine/component/trygetcomponent.md)
* [Component.GetComponent(string)](/engine/6000.7/script-reference/unityengine/component/getcomponent.md#getcomponent\(string\))
* [Component.GetComponentInChildren(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md#getcomponentinchildren\(type-bool\))
* [Component.GetComponentInChildren(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md#getcomponentinchildren\(type\))
* [Component.GetComponentInChildren\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md)
* [Component.GetComponentsInChildren(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentsInChildren\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md#getcomponentsinchildrent\(bool\))
* [Component.GetComponentsInChildren\<T>(bool, List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentsInChildren\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md#getcomponentsinchildrent\(\))
* [Component.GetComponentsInChildren\<T>(List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentInParent(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparent\(type-bool\))
* [Component.GetComponentInParent(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparent\(type\))
* [Component.GetComponentInParent\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparentt\(bool\))
* [Component.GetComponentInParent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparentt\(\))
* [Component.GetComponentsInParent(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md)
* [Component.GetComponentsInParent\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md#getcomponentsinparentt\(bool\))
* [Component.GetComponentsInParent\<T>(bool, List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md)
* [Component.GetComponentsInParent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md#getcomponentsinparentt\(\))
* [Component.GetComponents(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponents\(type\))
* [Component.GetComponents(Type, List\<Component>)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponents\(type-listcomponent\))
* [Component.GetComponents\<T>(List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md)
* [Component.GetComponents\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponentst\(\))
* [Component.GetComponentIndex()](/engine/6000.7/script-reference/unityengine/component/getcomponentindex.md)
* [Component.CompareTag(string)](/engine/6000.7/script-reference/unityengine/component/comparetag.md#comparetag\(string\))
* [Component.CompareTag(TagHandle)](/engine/6000.7/script-reference/unityengine/component/comparetag.md#comparetag\(taghandle\))
* [Component.SendMessageUpwards(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessageupwards.md#sendmessageupwards\(string-object-sendmessageoptions\))
* [Component.SendMessageUpwards(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessageupwards.md#sendmessageupwards\(string-sendmessageoptions\))
* [Component.SendMessage(string, Object)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-object\))
* [Component.SendMessage(string)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string\))
* [Component.SendMessage(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-object-sendmessageoptions\))
* [Component.SendMessage(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-sendmessageoptions\))
* [Component.BroadcastMessage(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/broadcastmessage.md#broadcastmessage\(string-object-sendmessageoptions\))
* [Component.BroadcastMessage(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/broadcastmessage.md#broadcastmessage\(string-sendmessageoptions\))
* [Component.transform](/engine/6000.7/script-reference/unityengine/component/transform.md)
* [Component.transformHandle](/engine/6000.7/script-reference/unityengine/component/transformhandle.md)
* [Component.gameObject](/engine/6000.7/script-reference/unityengine/component/gameobject.md)
* [Component.tag](/engine/6000.7/script-reference/unityengine/component/tag.md)
* [Object.GetEntityId()](/engine/6000.7/script-reference/unityengine/object/getentityid.md)
* [Object.GetHashCode()](/engine/6000.7/script-reference/unityengine/object/gethashcode.md)
* [Object.InstantiateAsync\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.Instantiate(Object, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion\))
* [Object.Instantiate(Object, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion-transform\))
* [Object.Instantiate(Object)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object\))
* [Object.Instantiate(Object, Scene)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-scene\))
* [Object.Instantiate\<T>(T, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate(Object, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform\))
* [Object.Instantiate(Object, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform-bool\))
* [Object.Instantiate\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Destroy(Object, float)](/engine/6000.7/script-reference/unityengine/object/destroy.md)
* [Object.DestroyImmediate(Object, bool)](/engine/6000.7/script-reference/unityengine/object/destroyimmediate.md)
* [Object.FindObjectsByType(Type)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type\))
* [Object.FindObjectsByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type-findobjectsinactive\))
* [Object.DontDestroyOnLoad(Object)](/engine/6000.7/script-reference/unityengine/object/dontdestroyonload.md)
* [Object.FindAnyObjectByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(\))
* [Object.FindAnyObjectByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(findobjectsinactive\))
* [Object.FindObjectsByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(\))
* [Object.FindObjectsByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(findobjectsinactive\))
* [Object.FindAnyObjectByType(Type)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type\))
* [Object.FindAnyObjectByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type-findobjectsinactive\))
* [Object.ToString()](/engine/6000.7/script-reference/unityengine/object/tostring.md)
* [Object.name](/engine/6000.7/script-reference/unityengine/object/name.md)
* [Object.hideFlags](/engine/6000.7/script-reference/unityengine/object/hideflags.md)

### Operators

| Operator                                                                           | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [operator ==](/engine/6000.7/script-reference/unityengine/object/op-equality.md)   | Compares two object references to see if they refer to the same object. |
| [bool](/engine/6000.7/script-reference/unityengine/object/op-implicit.md)          | Determines whether the object exists.                                   |
| [operator !=](/engine/6000.7/script-reference/unityengine/object/op-inequality.md) | Compares if two objects refer to a different object.                    |
