Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Changing PlayableDirector time while paused

Discussion in 'Timeline' started by not_DiSE, Oct 19, 2021.

  1. not_DiSE

    not_DiSE

    Joined:
    Feb 18, 2019
    Posts:
    17
    Hey, I recently started using PlayableDirector and I found, that while playable director is stopped using playableDirector.Pause() you cant set the time using playableDirector.time .

    Is there a way to change the time while paused ?
    (btw I cant change the time first and then pause it, I need it to be paused in the first place)
     
  2. grahamsaulnier

    grahamsaulnier

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    17
    After setting the time you will need to call `director.Evaluate();` or `director.DeferredEvaluate();` We do this in the Timeline Window when setting the director's time via the playhead or the time field while previewing.
     
    tsukimi and Midiphony-panda like this.
  3. cnguyen_magmic

    cnguyen_magmic

    Joined:
    Aug 7, 2017
    Posts:
    3
    Hi @grahamsaulnier
    I have a question that after we call `director.Evaluate();`, does the timeline affect to game object in world immediately. And we can get correct game object position.