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

Reverting changes to scene made by timeline during runtime

Discussion in 'Timeline' started by galman33, May 25, 2020.

  1. galman33

    galman33

    Joined:
    Jan 24, 2014
    Posts:
    7
    When playing a timeline using a Playable Director, and setting Wrap Mode to "none", I expect that after the timeline is done playing, the scene will revert back to its state before the timeline started playing (undoing all the changes the timeline has made).
    In reality, the scene is left in the state of the last frame of the timeline.

    Is that the expected behaviour? Is there a way (maybe through scripting?) to revert the changes of the timeline after it is done playing?
     
  2. Romano

    Romano

    Joined:
    Nov 27, 2013
    Posts:
    70
    Hey! I wish I had this problem. For me, with the Wrap Mode set to none, the scene reverts back to what it was before, but I'd like it to stay as it is at the end of the timeline.

    My PlayableDirector looks like this:
    upload_2020-6-12_14-17-1.png
    And here's the playable:
    upload_2020-6-12_14-17-32.png
     
  3. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,309
    Both of these are very dependent on what the timeline is doing.

    Animation tracks don't revert poses or values. Activation tracks have an option to revert or keep the current state.
     
unityunity