Class AnimationPlayableAsset | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class AnimationPlayableAsset

    A Playable Asset that represents a single AnimationClip clip.

    Inheritance
    System.Object
    AnimationPlayableAsset
    Namespace: UnityEngine.Timeline
    Syntax
    [Serializable]
    public class AnimationPlayableAsset : ISerializationCallbackReceiver, ITimelineClipAsset, IPropertyPreview, PlayableAsset

    Properties

    applyFootIK

    Enable to apply foot IK to the AnimationClip when the target is humanoid.

    Declaration
    public bool applyFootIK { get; set; }
    Property Value
    Type Description
    System.Boolean

    clip

    The source animation clip

    Declaration
    public AnimationClip clip { get; set; }
    Property Value
    Type Description
    AnimationClip

    clipCaps

    Returns the capabilities of TimelineClips that contain a AnimationPlayableAsset

    Declaration
    public ClipCaps clipCaps { get; }
    Property Value
    Type Description
    ClipCaps
    Implements
    ITimelineClipAsset.clipCaps

    duration

    Returns the duration required to play the animation clip exactly once

    Declaration
    public override double duration { get; }
    Property Value
    Type Description
    System.Double

    eulerAngles

    The rotational offset of the clip, expressed in Euler angles

    Declaration
    public Vector3 eulerAngles { get; set; }
    Property Value
    Type Description
    Vector3

    loop

    Whether the source AnimationClip loops during playback

    Declaration
    public AnimationPlayableAsset.LoopMode loop { get; set; }
    Property Value
    Type Description
    AnimationPlayableAsset.LoopMode

    matchTargetFields

    Specifies which fields should be matched when aligning offsets.

    Declaration
    public MatchTargetFields matchTargetFields { get; set; }
    Property Value
    Type Description
    MatchTargetFields

    outputs

    Returns a description of the PlayableOutputs that may be created for this asset.

    Declaration
    public override IEnumerable<PlayableBinding> outputs { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<PlayableBinding>

    position

    The translational offset of the clip

    Declaration
    public Vector3 position { get; set; }
    Property Value
    Type Description
    Vector3

    removeStartOffset

    Whether to make the animation clip play relative to its first keyframe.

    Declaration
    public bool removeStartOffset { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This option only applies to animation clips that animate Transform components.

    rotation

    The rotational offset of the clip, expressed as a Quaternion

    Declaration
    public Quaternion rotation { get; set; }
    Property Value
    Type Description
    Quaternion

    useTrackMatchFields

    Specifies whether to use offset matching options as defined by the track.

    Declaration
    public bool useTrackMatchFields { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    CreatePlayable(PlayableGraph, GameObject)

    Creates the root of a Playable subgraph to play the animation clip.

    Declaration
    public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
    Parameters
    Type Name Description
    PlayableGraph graph

    PlayableGraph that will own the playable

    GameObject go

    The gameobject that triggered the graph build

    Returns
    Type Description
    Playable

    The root playable of the subgraph

    GatherProperties(PlayableDirector, IPropertyCollector)

    Called by the Timeline Editor to gather properties requiring preview.

    Declaration
    public void GatherProperties(PlayableDirector director, IPropertyCollector driver)
    Parameters
    Type Name Description
    PlayableDirector director

    The PlayableDirector invoking the preview

    IPropertyCollector driver

    PropertyCollector used to gather previewable properties

    Implements
    IPropertyPreview.GatherProperties(PlayableDirector, IPropertyCollector)

    ResetOffsets()

    Resets the offsets to default values

    Declaration
    public void ResetOffsets()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023