CanvasRenderer

class in UnityEngine

/

Hereda de:Component

Cambiar al Manual

Descripción

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

See Also:Canvas.

Variables

absoluteDepthDepth of the renderer relative to the root canvas.
cullIndicates whether geometry emitted by this renderer is ignored.
cullTransparentMeshIndicates whether geometry emitted by this renderer can be ignored when the vertex color alpha is close to zero for every vertex of the mesh.
hasMovedTrue if any change has occured that would invalidate the positions of generated geometry.
hasPopInstructionEnable 'render stack' pop draw call.
hasRectClippingTrue if rect clipping has been enabled on this renderer. See Also: CanvasRenderer.EnableRectClipping, CanvasRenderer.DisableRectClipping.
materialCountThe number of materials usable by this renderer.
popMaterialCountThe number of materials usable by this renderer. Used internally for masking.
relativeDepthDepth of the renderer realative to the parent canvas.

Funciones Públicas

ClearRemove all cached vertices.
DisableRectClippingDisables rectangle clipping for this CanvasRenderer.
EnableRectClippingEnables rect clipping on the CanvasRendered. Geometry outside of the specified rect will be clipped (not rendered).
GetAlphaGet the current alpha of the renderer.
GetColorGet the current color of the renderer.
GetInheritedAlphaGet the final inherited alpha calculated by including all the parent alphas from included parent CanvasGroups.
GetMaterialGets the current Material assigned to the CanvasRenderer.
GetPopMaterialGets the current Material assigned to the CanvasRenderer. Used internally for masking.
SetAlphaSet the alpha of the renderer. Will be multiplied with the UIVertex alpha and the Canvas alpha.
SetAlphaTextureThe Alpha Texture that will be passed to the Shader under the _AlphaTex property.
SetColorSet the color of the renderer. Will be multiplied with the UIVertex color and the Canvas color.
SetMaterialSet 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'. See Also: CanvasRenderer.SetMaterialCount, CanvasRenderer.SetTexture.
SetMeshSets the Mesh used by this renderer.
SetPopMaterialSet the material for the canvas renderer. Used internally for masking.
SetTextureSets the texture used by this renderer's material.

Funciones Estáticas

AddUIVertexStreamTake the Vertex steam and split it corrisponding arrays (positions, colors, uv0s, uv1s, normals and tangents).
CreateUIVertexStreamConvert a set of vertex components into a stream of UIVertex.
SplitUIVertexStreamsGiven a list of UIVertex, split the stream into it's component types.

Events

onRequestRebuild(Editor Only) Event that gets fired whenever the data in the CanvasRenderer gets invalidated and needs to be rebuilt.

Miembros heredados

Variables

gameObjectEl game object que tiene este componente adjunto. Un componente siempre está adjunto a un game object.
tagEl tag de este game object.
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameEl nombre del objeto.

Funciones Públicas

BroadcastMessageLlama al método denominado methodName de todos los MonoBehaviour en este game objecto en cualquiera de sus hijos.
CompareTag¿Este game object está etiquetado con tag?
GetComponentDevuelve un componente de tipo type si el game object tiene a alguno adjuntado, o null si no lo tiene.
GetComponentInChildrenRetorna el componente de tipo type en el GameObject o cualquiera de sus hijos utilizando depth first search (busqueda de profundidad).
GetComponentInParentRetorna el componente de tipo type en el GameObject o cualquiera de sus padres.
GetComponentsRetorna todos los componentes de tipo type en el GameObject.
GetComponentsInChildrenRetorna todos los componentes de tipo type en el GameObject o cualquiera de sus hijo.
GetComponentsInParentRetorna todos los componentes de tipo type en el GameObject o cualquiera de sus padres.
SendMessageLlama al método denominado methodName en cada MonoBehaviour de este game object.
SendMessageUpwardsLlama al método denominado methodName en todos los MonoBehaviour de este juego y en todos los ancestros del behaviour.
GetInstanceIDDevuelve el id de la instancia del objeto.
ToStringReturns the name of the GameObject.

Funciones Estáticas

DestroyElimina un gameobject, componente o asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeDevuelve el primer objeto activo cargado de tipo type.
FindObjectsOfTypeDevuelve una lista de todos los objetos activos cargados de tipo type.
InstantiateClona el objeto original y devuelve el clon.

Operadores

bool¿Existe el objeto?
operator !=Compare si dos objetos se refieren a un objeto diferente.
operator ==Compara dos referencias de objeto para ver si se refieren al mismo objeto.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961