docs.unity3d.com
    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
    Namespace: UnityEditor.Timeline
    Syntax
    public static class TrackExtensions : object

    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
    Boolean

    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
    Boolean

    True if all parents are not collapsed, false otherwise.

    SetCollapsed(TrackAsset, Boolean)

    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.

    Boolean 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.

    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