- Home /
 
How to synchronize animation in Unity4.x
Hi, I want to synchronize animations with networkView, i am now synchronizing the animator state using networkView.PRC function, below is the example code:
     [RPC]
     void PlayAnimation(bool play, float tm)
     {
         _animator.SetBool("Play", play);
     }
 
     void Update () 
     {        
         if(Input.GetKeyDown(KeyCode.F))
         {
             networkView.RPC("EnableAnimation", RPCMode.AllBuffered, false);
         }
         if(Input.GetKeyDown(KeyCode.G))
         {
             networkView.RPC ("EnableAnimation", RPCMode.AllBuffered, true);
         }
     }
 
               But, there is a problem, if one of the clients is block by some reason or slowed down by any reason,the client can not be synchronized. Monitior the animation state and sync it? but i can not find related filed or parameters in unity4' Mechanism, if using legacy animation system, can i synchronize AnimationState.time in Update function? If using Mechanism, how can i synchronize it? Any answer will be appreciate,thanks in advance.
Your answer
 
             Follow this Question
Related Questions
Mecanim Network Animation State 1 Answer
Network Animator not working 0 Answers
Unity 5.2 Syncing Animator using Network Manager 0 Answers
Animation state Synchronization in Multiplayer 1 Answer
2D Animation does not start 1 Answer