Version: 2018.2

CanvasGroup

class in UnityEngine

/

Inherits from:Component


Implements interfaces:ICanvasRaycastFilter

Switch to Manual

Description

A Canvas placable element that can be used to modify children Alpha, Raycasting, Enabled state.

A canvas group can be used to modify the state of children elements.

An example of this would be a window which fades in over time, by modifying the alpha value of the group the children elements well be affected. The result alpha will be the multiplied result of any nested groups, multiplied with the canvas elements alpha.

Группы полотен (Canvas Groups) также могут быть настроены на то, чтобы не блокировать raycasts (что угодно в группе не будет рассматриваться для графического рейкастинга), а также на элементы, c которыми можно иметь взаимодействие.

Variables

alphaУстанавливает значение альфа для группы.
blocksRaycastsЭта группа блокирует рейкастинг (разрешает коллизию).
ignoreParentGroupsДолжна ли эта группа игнорировать родительские группы?
interactableIs the group interactable (are the elements beneath the group enabled).

Public Functions

IsRaycastLocationValidВозвращает значение true, если группа позволяет использовать лучи (raycasts).

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.