I’m testing it so that I’m running a host and client on the same pc. When I host and enter with the client, the host moves around and rotates perfectly on the client’s screen, but when the client moves, nothing happens on the host’s screen. Can somebody help with this?
Here’s the code for my PlayerSetup:
using UnityEngine;
using Mirror;
public class PlayerSetup : NetworkBehaviour
{
[SerializeField]
Behaviour[] componentsToDisable;
Camera sceneCamera;
void Start ()
{
if (!isLocalPlayer)
{
for (int i = 0; i < componentsToDisable.Length; i++)
{
componentsToDisable[i].enabled = false;
}
} else
{
sceneCamera = Camera.main;
if (sceneCamera != null)
{
sceneCamera.gameObject.SetActive(false);
}
}
}
void OnDisable ()
{
if (sceneCamera != null)
{
sceneCamera.gameObject.SetActive(true);
}
}
}