Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

UnityEngine.AnimationModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The Animation module implements Unity's animation system.

Classes

AimConstraintConstrains the orientation of an object relative to the position of one or more source objects, such that the object is facing the average position of the sources.
AnimationThe animation component is used to play back animations.
AnimationClipStores keyframe based animations.
AnimationEventAnimationEvent lets you call a script function similar to SendMessage as part of playing back an animation.
AnimationPlayableUtilitiesImplements high-level utility methods to simplify use of the Playable API with Animations.
AnimationStateThe AnimationState gives full control over animation blending.
AnimatorInterface to control the Mecanim animation system.
AnimatorControllerParameterUsed to communicate between scripting and the controller. Some parameters can be set in scripting and used by the controller, while other parameters are based on Custom Curves in Animation Clips and can be sampled using the scripting API.
AnimatorOverrideControllerInterface to control Animator Override Controller.
AnimatorUtilityVarious utilities for animator manipulation.
AvatarAvatar definition.
AvatarBuilderClass to build avatars from user scripts.
AvatarMaskAvatarMask is used to mask out humanoid body parts and transforms.
HumanPoseHandlerA handler that lets you read or write a HumanPose from or to a humanoid avatar skeleton hierarchy.
HumanTraitDetails of all the human bone and muscle types defined by Mecanim.
MotionBase class for AnimationClips and BlendTrees.
ParentConstraintConstrains 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.
PositionConstraintConstrains the position of an object relative to the position of one or more source objects.
RotationConstraintConstrains the rotation of an object relative to the rotation of one or more source objects.
RuntimeAnimatorControllerThe runtime representation of the AnimatorController. Use this representation to change the Animator Controller during runtime.
ScaleConstraintConstrains the scale of an object relative to the scale of one or more source objects.
SharedBetweenAnimatorsAttributeSharedBetweenAnimatorsAttribute is an attribute that specify that this StateMachineBehaviour should be instantiate only once and shared among all Animator instance. This attribute reduce the memory footprint for each controller instance.
StateMachineBehaviourStateMachineBehaviour is a component that can be added to a state machine state. It's the base class every script on a state derives from.

Structs

AnimationClipPlayableA Playable that controls an AnimationClip.
AnimationLayerMixerPlayableAn implementation of IPlayable that controls an animation layer mixer.
AnimationMixerPlayableAn implementation of IPlayable that controls an animation mixer.
AnimationPlayableOutputA IPlayableOutput implementation that connects the PlayableGraph to an Animator in the scene.
AnimatorClipInfoInformation about clip being played and blended by the Animator.
AnimatorControllerPlayableAn implementation of IPlayable that controls an animation RuntimeAnimatorController.
AnimatorStateInfoInformation about the current or next state.
AnimatorTransitionInfoInformation about the current transition.
ConstraintSourceRepresents a source for the constraint.
HumanBoneThe mapping between a bone in the model and the conceptual bone in the Mecanim human anatomy.
HumanDescriptionClass that holds humanoid avatar parameters to pass to the AvatarBuilder.BuildHumanAvatar function.
HumanLimitThis class stores the rotation limits that define the muscle for a single human bone.
HumanPoseRetargetable humanoid pose.
MatchTargetWeightMaskUse this struct to specify the position and rotation weight mask for Animator.MatchTarget.
SkeletonBoneDetails of the Transform name mapped to the skeleton bone of a model and its default position and rotation in the T-pose.

Enumerations

AnimationBlendModeUsed by Animation.Play function.
AnimationCullingTypeThis enum controlls culling of Animation component.
AnimatorControllerParameterTypeThe type of the parameter.
AnimatorCullingModeCulling mode for the Animator.
AnimatorRecorderModeThe mode of the Animator's recorder.
AnimatorUpdateModeThe update mode of the Animator.
AvatarIKGoalIK Goal.
AvatarIKHintIK Hint.
AvatarMaskBodyPartAvatar body part.
AvatarTargetTarget.
AxisRepresents the axes used in 3D space.
DurationUnitDescribe the unit of a duration.
HumanBodyBonesHuman Body Bones.
PlayModeUsed by Animation.Play function.
QueueModeUsed by Animation.Play function.
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答