Animator for multiplayer..

So i have script like this:

using UnityEngine;

[RequireComponent(typeof(Animator))]
[RequireComponent(typeof(PlayerMotor))]
public class PlayerController : MonoBehaviour{
    [SerializeField]
    private float speed = 5f;
    [SerializeField]
    private float lookSensitivity = 3f;
    [SerializeField]
    private float jumpSpeed = 5f;

    private bool isGrounded;

    private PlayerMotor motor;
    private Animator animator;


    void Start()
    {
        motor = GetComponent<PlayerMotor>();
        animator = GetComponent<Animator>();

    }

    void Update()
    {

        float _xMov = Input.GetAxis("Horizontal");
        float _zMov = Input.GetAxis("Vertical");

        Vector3 _movHorizontal = transform.right * _xMov;
        Vector3 _movVertical = transform.forward * _zMov;

        // Final movement vector
        Vector3 _velocity = (_movHorizontal + _movVertical) * speed;

        if (_zMov != 0)
        {
            animator.SetInteger("Movement", 1);
        }
        else
        {
            animator.SetInteger("Movement", 0);
        }

        //Apply movement
        motor.Move(_velocity);

        float _yRot = Input.GetAxisRaw("Mouse X");
        Vector3 _rotation = new Vector3(0f, _yRot, 0f) * lookSensitivity;
        motor.Rotate(_rotation);

        float _xRot = Input.GetAxisRaw("Mouse Y");
        float _cameraRotationX = _xRot * lookSensitivity;
        motor.RotateCamera(_cameraRotationX);

    }

}

and script

using UnityEngine;
using UnityEngine.Networking;

[RequireComponent(typeof(Player))]
[RequireComponent(typeof(PlayerController))]
public class PlayerSetup : NetworkBehaviour{

    [SerializeField]
    Behaviour[] componentsToDisable;

    void Start () {
        if (!isLocalPlayer)
        {
            DisableComponents();
        }else{

}

    void DisableComponents()
    {
        for (int i = 0; i < componentsToDisable.Length; i++)
        {
            componentsToDisable[i].enabled = false;
        }
    }

and i put playercontroller for PlayerSetup(componentsToDisable). I add NetworkTransformer for player and movement is works but when i put animation component for PlayerSetup(componentsToDisable)
every player sees only his animations…

@anon_309303

I added NetworkAnimator for prefab player but still not working.

@anon_309303

I need help :frowning:

HI,

I would be glad to help but am unsure to what you are asking. So, do you want to have local and online animations (one for local player, and the other for everyone else to see)?

If so, try using animation layers - that might help point you in the right direction. I will try to repost this in more detail later on if you want.

-Miggi124