Search Unity

Can Apply Scene Offsets reset after a playthrough?

Discussion in 'Timeline' started by LazloBonin, Nov 18, 2018.

  1. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    813
    I'm using 2018.3.0b10 with the new Apply Scene Offsets mode for Track Offsets on my Animation Track.

    It does exactly what I want in that it starts the timeline where my object was placed in the editor to begin with. So my editor playback matches my runtime playback, which is great!

    But my animator has root motion enabled, so if I play the same timeline twice, the second time, it'll start playing from where the first one ended. That's not the behaviour I'm looking for; I'd want it to start playing from where it was in the first place.

    Of course I could write a script that resets the position manually after the timeline, but I was wondering if there was another mode of avoiding that. I'm not sure what the "Auto" mode for track offsets does either; could it be what I need?
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    We are aware of that oversight, and hope to implement a fix soon. In the mean time, a simple workaround would be to re-play the timeline when playableDirector.stopped is triggered.

    Auto is the previous behaviour of track offsets prior to 2018.3. We kept it around to make upgrading as seemless as possible, but have deprecated it to discourage usage.
     
  3. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    813
    Thanks for the quick reply!

    What do you mean, re-play? Isn't that precisely what's causing the issue here? Is there a specific method that resets the offsets?
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    By re-play I mean when the timeline is _stopped_ start playing it again. This is different than the timeline looping. The offsets are captured when the timeline starts playing, and the loop doesn't recapture it.

    There isn't a method to reset the offsets either.
     
  5. Foxaphantsum

    Foxaphantsum

    Joined:
    Jul 5, 2013
    Posts:
    139
    Has this problem been resolved yet?

    I'm trying to manually set offset positions for whatever I animate however after the cutscene plays I want it to reset.