Animator.SetTime in Unity 5.6 beta (5.6.0b9)

Hello,

Does anyone know what happened with Animator.SetTime() function that was available in Unity 5.5? (SetTime, Sets the Player’s local time)

Can’t find that function in Unity 5.6.0b9, just need to set the starting position for playing Play() an animation.

Thanks!

Hi.

This was part of the Experimental DirectorPlayer API which has greatly changed in 5.6.

What is your current usage of the Animator ? are you using it in a conjunction with an AnimatorController ( StateMachine ) or with the Playable API ?

pp

If you are using the Playables simply set the time of the playable with this :

playableHandle.time = yourtime;

otherwise if using an AnimatorController use

animator.Play(STATENAME, -1, yournormalizedTime);

hope this helps.

cheers.

1 Like

Hello Pierrepaul,
Thanks for your response.
animator.Play(STATENAME, -1, yournormalizedTime);
Worked fine in Unity 5.6.0b11
Thank you!