Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

Animator

class in UnityEngine

/

Hereda de:Experimental.Director.DirectorPlayer


Implementa interfaces:IAnimatorControllerPlayable

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual

Descripción

Interface to control the Mecanim animation system.

Variables

angularVelocityGets the avatar angular velocity for the last evaluated frame.
applyRootMotionShould root motion be applied?
avatarGets/Sets the current Avatar.
bodyPositionThe position of the body center of mass.
bodyRotationThe rotation of the body center of mass.
cullingModeControls culling of this Animator component.
deltaPositionGets the avatar delta position for the last evaluated frame.
deltaRotationGets the avatar delta rotation for the last evaluated frame.
feetPivotActiveBlends pivot point between body center of mass and feet pivot. At 0%, the blending point is body center of mass. At 100%, the blending point is feet pivot.
gravityWeightThe current gravity weight based on current animations that are played.
hasRootMotionReturns true if the current rig has root motion.
hasTransformHierarchyReturns true if the object has a transform hierarchy.
humanScaleReturns the scale of the current Avatar for a humanoid rig, (1 by default if the rig is generic).
isHumanReturns true if the current rig is humanoid, false if it is generic.
isInitializedReturns whether the animator is initialized successfully.
isMatchingTargetIf automatic matching is active.
isOptimizableReturns true if the current rig is optimizable with AnimatorUtility.OptimizeTransformHierarchy.
layerCountSee IAnimatorControllerPlayable.layerCount.
layersAffectMassCenterAdditional layers affects the center of mass.
leftFeetBottomHeightGet left foot bottom height.
linearVelocityBlendingWhen linearVelocityBlending is set to true, the root motion velocity and angular velocity will be blended linearly.
parameterCountSee IAnimatorControllerPlayable.parameterCount.
parametersRead only acces to the AnimatorControllerParameters used by the animator.
pivotPositionGet the current position of the pivot.
pivotWeightGets the pivot weight.
playbackTimeSets the playback position in the recording buffer.
recorderModeObtiene el valor de un parámetro tipo vector.
recorderStartTimeStart time of the first frame of the buffer relative to the frame at which StartRecording was called.
recorderStopTimeEnd time of the recorded clip relative to when StartRecording was called.
rightFeetBottomHeightGet right foot bottom height.
rootPositionThe root position, the position of the game object.
rootRotationThe root rotation, the rotation of the game object.
runtimeAnimatorControllerThe runtime representation of AnimatorController that controls the Animator.
speedThe playback speed of the Animator. 1 is normal playback speed.
stabilizeFeetAutomatic stabilization of feet during transition and blending.
targetPositionReturns the position of the target specified by SetTarget(AvatarTarget targetIndex, float targetNormalizedTime)).
targetRotationReturns the rotation of the target specified by SetTarget(AvatarTarget targetIndex, float targetNormalizedTime)).
updateModeSpecifies the update mode of the Animator.
velocityGets the avatar velocity for the last evaluated frame.

Funciones Públicas

ApplyBuiltinRootMotionApply the default Root Motion.
CrossFadeSee IAnimatorControllerPlayable.CrossFade.
CrossFadeInFixedTimeSee IAnimatorControllerPlayable.CrossFadeInFixedTime.
GetAnimatorTransitionInfoSee IAnimatorControllerPlayable.GetAnimatorTransitionInfo.
GetBehaviourReturn the first StateMachineBehaviour that match type T or derived from T. Return null if none are found.
GetBehavioursReturns all StateMachineBehaviour that match type T or are derived from T. Returns null if none are found.
GetBoneTransformRetorna la transform anclada a la id de este hueso humano
GetBoolSee IAnimatorControllerPlayable.GetBool.
GetCurrentAnimatorClipInfoSee IAnimatorControllerPlayable.GetCurrentAnimatorClipInfo.
GetCurrentAnimatorStateInfoSee IAnimatorControllerPlayable.GetCurrentAnimatorStateInfo.
GetFloatSee IAnimatorControllerPlayable.GetFloat.
GetIKHintPositionGets the position of an IK hint.
GetIKHintPositionWeightGets the translative weight of an IK Hint (0 = at the original animation before IK, 1 = at the hint).
GetIKPositionGets the position of an IK goal.
GetIKPositionWeightGets the translative weight of an IK goal (0 = at the original animation before IK, 1 = at the goal).
GetIKRotationGets the rotation of an IK goal.
GetIKRotationWeightGets the rotational weight of an IK goal (0 = rotation before IK, 1 = rotation at the IK goal).
GetIntegerSee IAnimatorControllerPlayable.GetInteger.
GetLayerIndexSee IAnimatorControllerPlayable.GetLayerIndex.
GetLayerNameSee IAnimatorControllerPlayable.GetLayerName.
GetLayerWeightSee IAnimatorControllerPlayable.GetLayerWeight.
GetNextAnimatorClipInfoSee IAnimatorControllerPlayable.GetNextAnimatorClipInfo.
GetNextAnimatorStateInfoSee IAnimatorControllerPlayable.GetNextAnimatorStateInfo.
GetParameterSee AnimatorController.GetParameter.
HasStateSee IAnimatorControllerPlayable.HasState.
InterruptMatchTargetInterrupts the automatic target matching.
IsInTransitionSee IAnimatorControllerPlayable.IsInTransition.
IsParameterControlledByCurveSee IAnimatorControllerPlayable.IsParameterControlledByCurve.
MatchTargetAutomatically adjust the gameobject position and rotation so that the AvatarTarget reaches the matchPosition when the current state is at the specified progress.
PlaySee IAnimatorControllerPlayable.Play.
PlayInFixedTimeSee IAnimatorControllerPlayable.PlayInFixedTime.
RebindRebind all the animated properties and mesh data with the Animator.
ResetTriggerSee IAnimatorControllerPlayable.ResetTrigger.
SetBoneLocalRotationSets local rotation of a human bone during a IK pass.
SetBoolSee IAnimatorControllerPlayable.SetBool.
SetFloatSee IAnimatorControllerPlayable.SetFloat.
SetIKHintPositionSets the position of an IK hint.
SetIKHintPositionWeightSets the translative weight of an IK hint (0 = at the original animation before IK, 1 = at the hint).
SetIKPositionSets the position of an IK goal.
SetIKPositionWeightSets the translative weight of an IK goal (0 = at the original animation before IK, 1 = at the goal).
SetIKRotationSets the rotation of an IK goal.
SetIKRotationWeightSets the rotational weight of an IK goal (0 = rotation before IK, 1 = rotation at the IK goal).
SetIntegerSee IAnimatorControllerPlayable.SetInteger.
SetLayerWeightSee IAnimatorControllerPlayable.SetLayerWeight.
SetLookAtPositionSets the look at position.
SetLookAtWeightSet look at weights.
SetTargetSets an AvatarTarget and a targetNormalizedTime for the current state.
SetTriggerSee IAnimatorControllerPlayable.SetTrigger.
StartPlaybackSets the animator in playback mode.
StartRecordingSets the animator in recording mode, and allocates a circular buffer of size frameCount.
StopPlaybackStops the animator playback mode. When playback stops, the avatar resumes getting control from game logic.
StopRecordingStops animator record mode.
UpdateEvaluates the animator based on deltaTime.

Funciones Estáticas

StringToHashGenerates an parameter id from a string.

Miembros heredados

Variables

enabledEnabled Behaviours are Updated, disabled Behaviours are not.
isActiveAndEnabledHas the Behaviour had enabled called.
gameObjectThe game object this component is attached to. A component is always attached to a game object.
tagEl tag de este game object.
transformThe Transform attached to this GameObject (null if there is none attached).
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.
GetComponentInChildrenReturns the component of Type type in the GameObject or any of its children using depth first search.
GetComponentInParentReturns the component of Type type in the GameObject or any of its parents.
GetComponentsReturns all components of Type type in the GameObject.
GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children.
GetComponentsInParentReturns all components of Type type in the GameObject or any of its parents.
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.
GetTimeReturns the Player's current local time.
GetTimeUpdateModeReturns the current DirectorUpdateMode.
PlayStarts playing a Playable tree.
SetTimeSets the Player's local time.
SetTimeUpdateModeSpecifies the way the Player's will increment when it is playing.
StopStop the playback of the Player and Playable.
GetInstanceIDReturns the instance id of the object.
ToStringDevuelve el nombre del objeto.

Funciones Estáticas

DestroyElimina un gameobject, componente o asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically 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.
InstantiateDevuelve el nombre del objeto.

Operadores

bool¿Existe el objeto?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.