Search Unity

Any way to save & restore an Animator's current state ? Or copy it to another Animator ?

Discussion in 'Animation' started by manutoo, Apr 21, 2019.

  1. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    522
    Hello,

    I'd like to copy the full current state of an animtor to another animator, or at least save it for an animator to restore it at a later point.

    Is there any way to do that ?

    Saving & restoring the current animation & its time wouldn't be enough. I really need the full state, including the current transition process, which may have started from sampled transforms (ie: https://blogs.unity3d.com/2016/07/1...-mind-state-machine-transition-interruptions/ ).

    My use case, if you wonder : I'm using prediction in a network game to show the near future to hide the lag effect. So there are 2 animators : the sure one, and the predicted one. If the prediction fails, the animation needs to start over from the current sure state.

    Thanks in advance for any tip ! :)