docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TrackExtensions

    Extension Methods for Tracks that require the Unity Editor, and may require the Timeline containing the Track to be currently loaded in the Timeline Editor Window.

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

    Methods

    IsCollapsed(TrackAsset)

    Queries whether the children of the Track are currently visible in the Timeline Editor.

    Declaration
    public static bool IsCollapsed(this TrackAsset track)
    Parameters
    Type Name Description
    TrackAsset track

    The track asset to query.

    Returns
    Type Description
    bool

    True if the track is collapsed and false otherwise.

    IsVisibleInHierarchy(TrackAsset)

    Queries whether any parent of the track is collapsed, rendering the track not visible to the user.

    Declaration
    public static bool IsVisibleInHierarchy(this TrackAsset track)
    Parameters
    Type Name Description
    TrackAsset track

    The track asset to query.

    Returns
    Type Description
    bool

    True if all parents are not collapsed, false otherwise.

    SetCollapsed(TrackAsset, bool)

    Sets whether the children of the Track are currently visible in the Timeline Editor.

    Declaration
    public static void SetCollapsed(this TrackAsset track, bool collapsed)
    Parameters
    Type Name Description
    TrackAsset track

    The track asset to collapsed state to modify.

    bool collapsed

    true to collapse children, false otherwise.

    Remarks

    The track collapsed state is not serialized inside the asset and is lost from one checkout of the project to another.

    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)