(Unity Photon) How do I synchronise animations?

Updated on July 6, 2018 in [A] Multiplayer
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
0 on July 6, 2018

ive had this problem for 2 days now where i cant synchronise mechanim animations over the network. Ive tried photon.isMine, sending animator bool and float info through OnSerializeView, PhotonAnimatorView, nothing works the way it needs to. i have this simple script set up for my player model:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class playerblend : Photon.MonoBehaviour {
private Animator anim;
// Use this for initialization
 void Start ()
 anim = GetComponent<Animator>();
 if (anim == null)
 Debug.LogError("Animator not present in" + transform.name);
 // Update is called once per frame
 void Update ()
float x = Input.GetAxis("Horizontal");
 float y = Input.GetAxis("Vertical");
Move(x, y);
private void Move(float x, float y)
 anim.SetFloat("VelX", x);
 anim.SetFloat("VelY", y);

Simple. Change the x and y values of the animator, and the values are used in a blend tree. For some reason it wont sync through to the other clients. Can someone please help me? I really need help with this!

  • Liked by