Class AnimationTrackExtensions
Extension Methods for AnimationTracks that require the Unity Editor, and may require the Timeline containing the Animation Track to be currently loaded in the Timeline Editor Window.
Namespace: UnityEditor.Timeline
Syntax
public static class AnimationTrackExtensions : object
Methods
CanStartRecording(AnimationTrack)
Determines whether the Timeline window can enable recording mode on an AnimationTrack. For a track to support recording, it needs to have a valid scene binding, its offset mode should not be Auto and needs to be currently visible in the Timeline Window.
Declaration
public static bool CanStartRecording(this AnimationTrack track)
Parameters
Type | Name | Description |
---|---|---|
AnimationTrack | track | The track to query. |
Returns
Type | Description |
---|---|
Boolean | True if recording can start, False otherwise. |
IsRecording(AnimationTrack)
Method that allows querying if a track is current enabled for animation recording.
Declaration
public static bool IsRecording(this AnimationTrack track)
Parameters
Type | Name | Description |
---|---|---|
AnimationTrack | track | The track to query. |
Returns
Type | Description |
---|---|
Boolean | True if currently recording and False otherwise. |
StartRecording(AnimationTrack)
Method that enables animation recording for an AnimationTrack.
Declaration
public static bool StartRecording(this AnimationTrack track)
Parameters
Type | Name | Description |
---|---|---|
AnimationTrack | track | The AnimationTrack which will be put in recording mode. |
Returns
Type | Description |
---|---|
Boolean | True if track was put successfully in recording mode, False otherwise. |
StopRecording(AnimationTrack)
Disables recording mode of an AnimationTrack.
Declaration
public static void StopRecording(this AnimationTrack track)
Parameters
Type | Name | Description |
---|---|---|
AnimationTrack | track | The AnimationTrack which will be taken out of recording mode. |