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.
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 |
|
Remarks
The track collapsed state is not serialized inside the asset and is lost from one checkout of the project to another.