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.
Inherited Members
Namespace: UnityEditor .Timeline
Assembly: Unity.Timeline.Editor.dll
Syntax
public static class AnimationTrackExtensions
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 |
---|---|---|
Animation |
track | The track to query. |
Returns
Type | Description |
---|---|
bool | 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 |
---|---|---|
Animation |
track | The track to query. |
Returns
Type | Description |
---|---|
bool | 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 |
---|---|---|
Animation |
track | The AnimationTrack which will be put in recording mode. |
Returns
Type | Description |
---|---|
bool | 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 |
---|---|---|
Animation |
track | The AnimationTrack which will be taken out of recording mode. |