Is there a way to make my timeline go to last frame and just pause there? I know there is PlayableDirector.time
but I want my script to automatically find out the last frame of the timeline. How do I do this?
using UnityEngine.Playables;
public PlayableDirector currentTimeline;
void Start(){
currentTimeline.time = 0; //Go to last frame
currentTimeline.Pause();
}
CodePudding user response:
currentTimeline.time = 0;
actually goes to the first frame and if I understand you correctly you probably rather want
currentTimeline.time = currentTimeline.duration;