private void Awake() { if (PM == null) { PM = this; } else if (PM != this) { Destroy(PM); PM = this; } DontDestroyOnLoad(this.gameObject); PV = GetComponent <PhotonView>(); }