Search Unity

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. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,977
  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!
     
    MadeFromPolygons likes this.
  6. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,977
    you are most welcome :)