|
Timeline Mixer Documentation
|
Public Member Functions | |
| void | Initialize () |
| Allows you to initialize timelinemixercomponent at a time of your choosing if autoinitialize is false. Playback methods will not work if uninitialized. | |
| void | Uninitialize () |
| Return the Timeline Mixer component to an uninitialized dormant state. The playable graph will be destroyed, and all internal collections cleared. The components list of timeline assets will be preserved. Initialize must be called again to continue using the component. | |
| void | UninitializeAndClearTimelines () |
| Return the Timeline Mixer component to an uninitialized dormant state. The playable graph will be destroyed, and all internal collections cleared. The components list of timeline assets will be destroyed and NOT preserved. Initialize must be called again to continue using the component. | |
| void | SetGraph (PlayableGraph playableGraph) |
| The playable graph to use can be set before Initialize is called, useful if you need TimelineMixer to use a specific graph to help integrate it with your custom tool. Do not use a playable directors graph, or any graph that you don't manage the lifecycle for. | |
| void | AddTimeline (TimelineAsset timelineAsset, bool useDirectorBindings=true) |
| Timelines can be added to the system at runtime by passing in a timeline asset, but they will have no bindings to start with. You will need to use the RebindTrack method to set your bindings. I haven't included a way to pass a list of bindings, as this could VERY easily lead to mistakes, errors and incorrect bindings. Nobody wants an animation track bound to an audio source. | |
| void | Play (string timelineAssetName, float startTime=-1f, int? loopMode=null) |
| Plays a Timeline from the string name, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method. | |
| void | FadeIn (string timelineAssetName, float fadeTime=1f, float startTime=-1f, int? loopMode=null) |
| Fades in a Timeline from the string name, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method. | |
| void | FadeOut (string timelineAssetName, float fadeTime=1f) |
| Fades out a Timeline from the string name, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method. | |
| void | Crossfade (string fadeInTimelineName, string fadeOutTimelineName, float fadeTime=1f, float startTime=-1f) |
| Fades in one Timeline, and fades out another Timeline at the same rate, does a search for the TimelineAssets from the name passed in, and calls the Timeline as key version of the method. | |
| void | FadeTo (string timelineAssetName, float targetWeight, float fadeTime=1f, float startTime=-1, int? loopMode=null) |
| Allows more control than other playback methods, can fade out or in depending on parameter values, and also partially fade in a Timeline, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method. | |
| void | Play (TimelineAsset timelineAsset, float startTime=-1f, int? loopPlayback=null) |
| Plays a Timeline matching the TimelineAsset passed in. | |
| void | FadeIn (TimelineAsset timelineAsset, float fadeTime=1f, float startTime=-1f, int? loopMode=null) |
| Fades in a Timeline matching the TimelineAsset passed in. | |
| void | FadeOut (TimelineAsset timelineAsset, float fadeTime=1f) |
| Fades out a Timeline matching the TimelineAsset passed in. | |
| void | Crossfade (TimelineAsset fadeInAsset, TimelineAsset fadeOutAsset=null, float fadeTime=1f, float startTime=-1f) |
| Fades in one Timeline and fades out another Timeline at the same rate. | |
| void | FadeTo (TimelineAsset timelineAsset, float targetWeight, float fadeTime=1f, float startTime=-1, int? loopMode=null, float easeOut=-1) |
| Allows more control than other playback methods, can fade out or in depending on parameter values, and also partially fade in a Timeline, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method. | |
| PlayableNode | GetExternalConnectionAnimationNode (Animator animator) |
| Find the AnimationMixer node that will allow you to connect your custom animation system or other animation related playables. This is the same AnimationMixer that the AnimatorControllerPlayable connects to. Weights on this mixer are not automatically managed, except for when the AnimatorControllerPlayable is connected. You will need to change weights as needed. | |
| void | SetTimelineEvent (TimelineAsset timelineAsset, float time, Action eventCallback, NotificationFlags notificationFlags=NotificationFlags.Retroactive) |
| Sets an event on the selected TimelineAsset at runtime. | |
| void | ClearTimelineEvents (TimelineAsset timelineAsset) |
| Destroys all events assigned to the timeline. Targeting individual events is not possible. | |
| Public Member Functions inherited from TimelineMixer.TimelineMixerBase | |
| void | SetTimeUpdateMode (DirectorUpdateMode mode) |
| Change the update mode of the Playable Graph to suit your requirements. | |
| void | SetSpeed (TimelineAsset timelineAsset, float speed) |
| Changes the playback speed of a timeline. | |
| void | SetTime (TimelineAsset timelineAsset, float time) |
| Set the current time of a timeline. | |
| void | SetTimeSmooth (TimelineAsset timelineAsset, float targetTime, float duration, AnimationCurve curve=null, bool pauseOnEnd=false) |
| Set a target time for a timeline, which will be reached over X seconds. You can use values higher and lower than the current time to move time back and forward. You can pass in an AnimationCurve to change ease in and out. Do not call this every frame, it should be treated as a one-shot call. | |
| void | RebindTrack (TimelineAsset timelineAsset, string trackName, UnityEngine.Object binding, bool doNotRebind=false) |
| Allows you to rebind your timeline tracks at runtime, these changes will not show or be recorded in the PlayableDirector. Be careful with this, it is possible to bind unsupported components. Animation track bound to Audio Source for example. | |
| void | RemoveTimeline (string timelineName) |
| Remove a Timeline Asset completely from Timeline Mixer. The Timeline will be stripped from the playable graph, and removed from the component list. | |
| void | RemoveTimeline (TimelineAsset timelineAsset) |
| Remove a Timeline Asset completely from Timeline Mixer. The Timeline will be stripped from the playable graph, and removed from the component list. | |
Private Member Functions | |
| HashSet< TimelineAsset > | RemoveDuplicates (List< TimelineAsset > timelineAssets) |
| Creates a HashSet of Timeline Assets from the original list, removing any duplicate entries. | |
| List< BindingData > | CreateBindingGroups (HashSet< TimelineAsset > timelineAssets) |
| Creates BindingData objects to hold information about bindings. | |
| void | SoloModeSwitch (float fadeTime=0f) |
| When you switch modes at runtime this is called, if the mode is changed to Solo then all but the last used timeline will be faded out. | |
Additional Inherited Members | |
| Public Types inherited from TimelineMixer.TimelineMixerBase | |
| enum | Mode |
| In Solo mode the system will try to keep only one timeline active at one time, Multiple mode (Default) has no restrictions on the amount of timelines active. | |
| Protected Member Functions inherited from TimelineMixer.TimelineMixerBase | |
| TimelineAsset | GetTimelineWithName (string name) |
| Returns a TimelineAsset with the given name, if it exists in the list. | |
| void | FadeTo (BindingData bindingData, float targetWeight, float fadeTime=10f, float startTime=-1, int? loopPlayback=null) |
| Playback ///. | |
|
inline |
Timelines can be added to the system at runtime by passing in a timeline asset, but they will have no bindings to start with. You will need to use the RebindTrack method to set your bindings. I haven't included a way to pass a list of bindings, as this could VERY easily lead to mistakes, errors and incorrect bindings. Nobody wants an animation track bound to an audio source.
| timelineAsset | The timeline asset to add to the system. |
|
inline |
Destroys all events assigned to the timeline. Targeting individual events is not possible.
| timelineAsset | Timeline to remove events on. |
|
inlineprivate |
Creates BindingData objects to hold information about bindings.
| timelineAssets | HashSet of TimelineAssets to be processed, for each TimelineAsset a BindingGroup is created |
|
inline |
Fades in one Timeline, and fades out another Timeline at the same rate, does a search for the TimelineAssets from the name passed in, and calls the Timeline as key version of the method.
| fadeInTimelineName | The name of the timeline to fade in |
| fadeOutTimelineName | The name of the timeline to fade out |
| fadeTime | The duration of the fade in seconds |
| startTime | The time, relative to the timeline to start playing from. If left at the default value this parameter is ignored |
|
inline |
Fades in one Timeline and fades out another Timeline at the same rate.
| fadeInAsset | The Timeline to fade in |
| fadeOutAsset | The Timeline to fade out |
| fadeTime | The duration of the fade in seconds |
| startTime | The time, relative to the timeline to start playing from. Takes effect only on the Timeline fading in. If left at the default value this parameter is ignored |
|
inline |
Fades in a Timeline from the string name, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method.
| timelineAssetName | The name of the timeline to fade in |
| fadeTime | The duration of the fade in seconds |
| startTime | The time, relative to the timeline to start playing from. If left at the default value this parameter is ignored |
| loopMode | Should the timeline loop? Takes a LoopMode option |
|
inline |
Fades in a Timeline matching the TimelineAsset passed in.
| timelineAsset | The Timeline to fade in |
| fadeTime | The duration of the fade in seconds |
| startTime | The time, relative to the timeline to start playing from. If left at the default value this parameter is ignored |
| loopPlayback | Should the timeline loop? Takes a LoopMode option |
|
inline |
Fades out a Timeline from the string name, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method.
| timelineAssetName | The name of the timeline to fade out |
| fadeTime | The duration of the fade in seconds |
| startTime | The time, relative to the timeline to start playing from. If left at the default value this parameter is ignored |
| loopMode | Should the timeline loop? Takes a LoopMode option |
|
inline |
Fades out a Timeline matching the TimelineAsset passed in.
| timelineAsset | The Timeline to fade out |
| fadeTime | The duration of the fade in seconds |
|
inline |
Allows more control than other playback methods, can fade out or in depending on parameter values, and also partially fade in a Timeline, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method.
| timelineAssetName | The name of the Timeline to operate on |
| targetWeight | 0 - 1 float value, allows partial fades |
| fadeTime | The duration of the fade in seconds |
| startTime | The time, relative to the timeline to start playing from. If left at the default value this parameter is ignored |
| loopMode | Should the timeline loop? Takes a LoopMode option |
|
inline |
Allows more control than other playback methods, can fade out or in depending on parameter values, and also partially fade in a Timeline, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method.
| timelineAsset | The TimelineAsset to operate on |
| targetWeight | 0 - 1 float value, allows a Timeline to be partially faded in |
| fadeTime | The duration of the fade in seconds |
| startTime | The time, relative to the timeline to start playing from. Takes effect only on the Timeline fading in. If left at the default value this parameter is ignored |
| loopPlayback | Should the timeline loop? Takes a LoopMode option |
|
inline |
Find the AnimationMixer node that will allow you to connect your custom animation system or other animation related playables. This is the same AnimationMixer that the AnimatorControllerPlayable connects to. Weights on this mixer are not automatically managed, except for when the AnimatorControllerPlayable is connected. You will need to change weights as needed.
| animator |
|
inline |
Plays a Timeline from the string name, does a search for the TimelineAsset from the name passed in, and calls the Timeline as key version of the method.
| timelineAssetName | The name of the timeline to play |
| startTime | The time, relative to the timeline to start playing from. If left at the default value this parameter is ignored |
| loopMode | Should the timeline loop? Takes a LoopMode option |
|
inline |
Plays a Timeline matching the TimelineAsset passed in.
| timelineAsset | The Timeline to play |
| startTime | The time, relative to the timeline to start playing from. If left at the default value this parameter is ignored |
| loopPlayback | Should the timeline loop? Takes a LoopMode option |
|
inlineprivate |
Creates a HashSet of Timeline Assets from the original list, removing any duplicate entries.
| timelineAssets |
|
inline |
The playable graph to use can be set before Initialize is called, useful if you need TimelineMixer to use a specific graph to help integrate it with your custom tool. Do not use a playable directors graph, or any graph that you don't manage the lifecycle for.
| playableGraph |
|
inline |
Sets an event on the selected TimelineAsset at runtime.
| timelineAsset | The selected TimelineAsset that will recieve the event. |
| time | The time on the timeline for the event to fire. |
| eventCallback |
|
inlineprivate |
When you switch modes at runtime this is called, if the mode is changed to Solo then all but the last used timeline will be faded out.
| fadeTime | The time it takes to fade all timelines out in seconds |