CanvasRenderer

class in UnityEngine

/

Inherits from:Component

Switch to Manual

Description

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

absoluteDepthГлубина рендеринга по отношению к корневому полотну (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.
relativeDepthГлубина рендеринга относительно родительского полотна (canvas).

Public Functions

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.
GetMaterialПолучает текущий Material, назначенный к UIRenderer.
GetPopMaterialПолучает текущий Material, назначенный к UIRenderer.
SetAlphaУстанавливает альфа-канал рендеринга. Будет умножен на UIVertex альфа-канал и Canvas альфа-канал.
SetAlphaTextureThe Alpha Texture that will be passed to the Shader under the _AlphaTex property.
SetColorУстанавливает цвет рендеринга. Будет умножен на UIVertex цвет и Canvas цвет.
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.
SetMeshПолучает текущий цвет рендеринга.
SetPopMaterialSet the material for the canvas renderer. Used internally for masking.
SetTextureSets the texture used by this renderer's material.

Static Functions

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.

Inherited members

Variables

gameObjectИгровой объект к которому прикреплён данный компонент. Компонент всегда прикреплён к игровому объекту.
tagТег данного игрового объекта.
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public Functions

BroadcastMessageВызывает метод названный methodName на каждом MonoBehaviour этого game object-а или любого из его потомков.
CompareTagПомечен ли данный игровой объект тегом tag?
GetComponentВозвращает компонент типа type, если он прикреплен к игровому объекту и null, если не прикреплен.
GetComponentInChildrenВозвращает компонент типа type в GameObject или некоторого его потомка через поиск в глубину.
GetComponentInParentВозвращает все компоненты типа type из GameObject'а или из любого его родителя.
GetComponentsВозвращает все компоненты типа type в GameObject.
GetComponentsInChildrenВозвращает все компоненты типа type в GameObject или любому из его потомков.
GetComponentsInParentВозвращает все компоненты типа type в GameObject или любому из его родителей.
SendMessageВызывает метод с названием methodName в каждом MonoBehaviour в этом игровом объекте.
SendMessageUpwardsВызывает метод с именем methodName в каждом MonoBehaviour в этом игровом объекте и в каждом предке поведения.
GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the GameObject.

Static Functions

DestroyУдаляет GameObject, Component или 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.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateClones the object original and returns the clone.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.