AnyPortrait > Script > Timeline
The following are the functions to work with Unity's Timeline function.
These functions are available in AnyPortrait version 1.1.6.
For more information on how to work with the timeline, see the related page.
To link the timeline, register the name of "Playable Director" and the track as "Track Data".
You can register two or more Playable Director or tracks.
When multiple tracks are registered for a common Playable Director, they are processed in the same way as multi-layer animation.
At this time, you can input the order of layers and blending method as arguments.
If you register different Playable Directors, it will only be controlled by one of the Playable Director currently playing.
UnityEngine.Playables.PlayableDirector playableDirector : Playable Director you want to register
string trackName : The name of the track to be associated with the timeline of the Playable Director.
int layer : The order of layers when playing in multiple layers (default is 0)
apAnimPlayUnit.BLEND_METHOD blendMethod : The blend method when played in multiple layers (default is BLEND_METHOD.Additive)
bool : Returns true if the Playable Director exists and the name of the track is valid; false otherwise.
Remove all track data that is not currently valid.
This is the case when Playable Director, Timeline Asset, or Track can not be linked for reasons such as not being present in the scene.
Remove all registered track data.
Removes all track data associated with the entered Playable Director.
UnityEngine.Playables.PlayableDirector playableDirector : Playable Director of the track you want to remove
Set whether animations are played by the timeline.
If true, the animation will play according to the Playable Director, but if it is false, it will not be controlled by the Playable Director.
bool isEnabled : Whether to play by the timeline