Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Accessing Playable Director from a track to get the current time

Discussion in 'Timeline' started by Carwashh, Nov 6, 2017.

  1. Carwashh


    Jul 28, 2012
    How do I access the Playable Director from a track to get the current time?

    I'm trying to do this because if you use loop the playable.GetTime() in a mixerbehaviour returns an accumulated time of all loops played (eg: timeline is 3 seconds long, first loop returns 0-3 secs, seond loop returns 3.1-6secs, 4th loop 6.1-9secs...and so on). Looking at the playable director in the inspector shows the current time looping round from 0-3 for all loops, I need this time -> how?
  2. seant_unity


    Unity Technologies

    Aug 25, 2015
    playable.GetGraph().GetResolver() as PlayableDirector will give you the playable director playing the timeline.
    Carwashh likes this.