Skip to main content

AnimationClip

info

AnimationClip inherits from Motion

Stores keyframe based animations.

Members

Properties

NameDescription
AnimationClip.emptyReturns true if the animation clip has no curves and no events.
AnimationClip.eventsAnimation Events for this animation clip.
AnimationClip.frameRateFrame rate at which keyframes are sampled. (Read Only)
AnimationClip.hasGenericRootTransformReturns true if the Animation has animation on the root transform.
AnimationClip.hasMotionCurvesReturns true if the AnimationClip has root motion curves.
AnimationClip.humanMotionReturns true if the animation contains curve that drives a humanoid rig.
AnimationClip.legacySet to true if the AnimationClip will be used with the Legacy Animation component ( instead of the Animator ).
AnimationClip.lengthAnimation length in seconds. (Read Only)
AnimationClip.localBoundsAABB of this Animation Clip in local space of Animation component that it is attached too.
AnimationClip.wrapModeSets the default wrap mode used in the animation state.

Constructor

NameDescription
AnimationClip()Creates a new animation clip.

Methods

NameDescription
AnimationClip.AddEvent(evt)Adds an animation event to the clip.
AnimationClip.ClearCurves()Clears all curves from the clip.
AnimationClip.EnsureQuaternionContinuity()Realigns quaternion keys to ensure shortest interpolation paths.
AnimationClip.SampleAnimation(go, time)Samples an animation at a given time for any animated properties.
AnimationClip.SetCurve(relativePath, type, propertyName, curve)Assigns the curve to animate a specific property.

Inherited Members

Inherited Properties

NameDescription
AnimationClip.hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
AnimationClip.nameThe name of the object.

Inherited Methods

NameDescription
AnimationClip.GetInstanceID()Returns the instance id of the object.

Extra Detail

AnimationClip is used by Animation to play back animations. Unity AnimationClip