Version: 2019.2

ParentConstraint

class in UnityEngine.Animations

/

Inherits from:Behaviour


Implements interfaces:IConstraint

Switch to Manual

Description

Constrains the orientation and translation of an object to one or more source objects. The constrained object behaves as if it is in the hierarchy of the sources.

Variables

constraintActiveActivates or deactivates the constraint.
lockedLocks the offsets and position (translation and rotation) at rest.
rotationAtRestThe rotation used when the sources have a total weight of 0.
rotationAxisThe rotation axes affected by the ParentConstraint.
rotationOffsetsThe rotation offsets from the constrained orientation.
sourceCountThe number of sources set on the component (read-only).
translationAtRestThe position of the object in local space, used when the sources have a total weight of 0.
translationAxisThe translation axes affected by the ParentConstraint.
translationOffsetsThe translation offsets from the constrained orientation.
weightThe weight of the constraint component.

Public Functions

AddSourceAdds a constraint source.
GetRotationOffsetGets the rotation offset associated with a source by index.
GetSourceGets a constraint source by index.
GetSourcesGets the list of sources.
GetTranslationOffsetGets the rotation offset associated with a source by index.
RemoveSourceRemoves a source from the component.
SetRotationOffsetSets the rotation offset associated with a source by index.
SetSourceSets a source at a specified index.
SetSourcesSets the list of sources on the component.
SetTranslationOffsetSets the translation offset associated with a source by index.

Inherited members

Variables

enabledВключенное Поведение обновляется, выключенное Поведение не обновляется.
isActiveAndEnabledHas the Behaviour had active and enabled called?
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 object.

Static Functions

DestroyRemoves a GameObject, component or 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.