using UnityEngine;
using UnityEngine.Networking;
public class PlayerSetup : NetworkBehaviour {
[SerializeField]
Behaviour[] componentsToDisable;
Camera sceneCamera
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);
}
}
}