docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TimelineClipExtensions

    Extension methods for TimelineClip

    Inheritance
    object
    TimelineClipExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Timeline
    Assembly: Unity.Timeline.dll
    Syntax
    public static class TimelineClipExtensions

    Methods

    MoveToTrack(TimelineClip, TrackAsset)

    Tries to move a TimelineClip to a different track. Validates that the destination track can accept the clip before performing the move. Fails if the clip's PlayableAsset is null, the current and destination tracks are the same or the destination track cannot accept the clip.

    Declaration
    public static void MoveToTrack(this TimelineClip clip, TrackAsset destinationTrack)
    Parameters
    Type Name Description
    TimelineClip clip

    Clip that is being moved

    TrackAsset destinationTrack

    Desired destination track

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if clip or destinationTrack are null

    InvalidOperationException

    Thrown if the PlayableAsset in the TimelineClip is null

    InvalidOperationException

    Thrown if the current parent track and destination track are the same

    InvalidOperationException

    Thrown if the destination track cannot hold tracks of the given type

    TryMoveToTrack(TimelineClip, TrackAsset)

    Tries to move a TimelineClip to a different track. Validates that the destination track can accept the clip before performing the move. Fails if the clip's PlayableAsset is null, the current and destination tracks are the same or the destination track cannot accept the clip.

    Declaration
    public static bool TryMoveToTrack(this TimelineClip clip, TrackAsset destinationTrack)
    Parameters
    Type Name Description
    TimelineClip clip

    Clip that is being moved

    TrackAsset destinationTrack

    Desired destination track

    Returns
    Type Description
    bool

    Returns true if the clip was successfully moved to the destination track, false otherwise. Also returns false if either argument is null

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if clip or destinationTrack are null

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)