void Initialize() { if (photonView.IsMine) { } else { // if player does not control the object, then disable all the necessary control elements playerCamera.gameObject.SetActive(false); foreach (MonoBehaviour script in scriptsToIgnore) { script.enabled = false; } } // add to NetworkManager db NetworkManager.AddPlayer(this); // set player properties score = 0; health = playerHealth.maxHealth; }