Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How to Programmatically set TimeLine position?

Discussion in 'Timeline' started by elettrozero, May 31, 2018.

  1. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    I'd like to make a skippable cutscene but skipping would make the Timeline play from a certain position near the end.
    I cannot find a method to do that.
     
  2. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    2,131
  3. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    Sorry, I don't see the part where the Timeline skips to a specifi time or frame... :(
     
  4. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    I see you do this:
    (playable.GetGraph().GetResolver() as PlayableDirector).time = (double)input.timeToJumpTo;

    But setting time in my PlayableDirector didn't work.
     
  5. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    Actually, it's ok! Thanks!
     
    GameDevCouple_I likes this.
  6. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    2,131
    you are most welcome :)