Search Unity

Feedback Implementing Play backward suggestion

Discussion in 'Timeline' started by URocks, Oct 30, 2019.

  1. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    159
    Instead of implementing proper play backward feature, I think it might be sufficient to have a possibility to change speed multiplier to a negative number. So when I want my clip to play backward I just set it to -1
    And I think it should not be that hard to implement. What do you think?
     
  2. ewanuno

    ewanuno

    Joined:
    May 11, 2017
    Posts:
    58
    unfortunately it's not that simple, how do you play audio backwards? how do you send a signal in reverse?

    luckily doing it by yourself is fairly simple(although signals and audio don't work in reverse):

    in essence you just set PlayableDirector.timeUpdateMode to Manual
    then call PlayableDirector.Evaluate() on each frame.
     
  3. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    159
    You are right and your approach looks pretty cool. What would be great though, is to have some track override option which will reverse the entire timeline clip automatically, so if it would be animation it will reverse it, or if it would be a timeline with a lot of tracks, it will reverse it aswell. In this way signals could work, about audio I am not sure.
    Maybe it can be done by scripting to reverse clip