Search Unity

Apply Timeline frame to scene in editor

Discussion in 'Timeline' started by SolusViator, Apr 7, 2020.

  1. SolusViator

    SolusViator

    Joined:
    Nov 23, 2016
    Posts:
    3
    Hello,

    I'm trying to use timeline in my game with story is driven by user choices.

    Sequencing animations and audio with timeline is perfect. But problem showed when while recording different animations depend on user choice.

    Is possible to apply last frame of timeline to scene? Because new timeline should start from state of the last frame from previous timeline. While turning off preview the character is going to initial position. Ofcourse many objects can move not only main character and placing all of objects to the right positions can be very time consuming.
    Or maby you have idea how to deal with this problem.

    I hope my explanation is good enough to understand.

    Thanks for help!
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    If you set your animations tracks TrackOffsets to ApplySceneOffsets, they will start from their current position. This will start them from their current position in the scene. When you author them they will use their default scene position, but in playmode, like an animator controller, they will just start from where-ever they currently are. This can be used to chain timelines.

    If you need to force a particular frame of a timeline, you can also use

    playableDirector.time = x;
    playableDirector.Evaluate().
     
  3. SolusViator

    SolusViator

    Joined:
    Nov 23, 2016
    Posts:
    3
    Thanks for help!
    Evaluate works like a charm.