Okay, so I thought this would be really easy to do but (sadly) it’s not. I’ve got a script that takes horizontal and vertical input, and then gets an animator to control a blend tree using those values. And it does work, but when I try to sync up the script over Unity Photon, none of the animations play. I’ve set the script to disable if PhotonView.isMine is false, but I still can’t see other players being animated. Can someone help? Here is my script:
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>();
}
// Update is called once per frame
void Update ()
{
if (anim == null)
{
Debug.LogError("Animator not present in" + transform.name);
}
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);
}
}
I have also added a Photon Animator View to the character, but to no avail. Thanks in advance for your help!