i added a sceneCamera as a camera and set it up, and i tried to code and make it were it would disappear if i was in, but if another player was in it would appear for just them, and i keep getting Error CS0130
This is the code:
using UnityEngine;
using UnityEngine.Networking;
using Mirror;
public class PlayerSetup : NetworkBehaviour {
[SerializeField]
Behaviour[ ] componentsToDisable;
void Start()
{
if (!isLocalPlayer)
{
for (int i = 0; i < componentsToDisable.Length; i++)
{
componentsToDisable*.enabled = false;*
}
} else
{
sceneCamera= Camera.main;
if(sceneCamera != null)
{
sceneCamera.gameObject.SetActive(false);
}
}
}
void OnDisable()
{
if (sceneCamera != null)
{
sceneCamera.gameObject.SetActive(true);
}
}
}
