private void Awake() { if (QuickStartRoomController.room == null) { QuickStartRoomController.room = this; } else { if (QuickStartRoomController.room != this) { Destroy(QuickStartRoomController.room.gameObject); QuickStartRoomController.room = this; } } DontDestroyOnLoad(this.gameObject); PV = GetComponent <PhotonView>(); }
public override void OnEnable() { if (QuickStartRoomController.QSRC == null) { QuickStartRoomController.QSRC = this; } else { if (QuickStartRoomController.QSRC != this) { Destroy(this.gameObject); } } DontDestroyOnLoad(this.gameObject); PhotonNetwork.AddCallbackTarget(this); }
private void Awake() { if (QuickStartRoomController.room == null) { QuickStartRoomController.room = this; } else { if (QuickStartRoomController.room != this) { Destroy(QuickStartRoomController.room.gameObject); QuickStartRoomController.room = this; } } DontDestroyOnLoad(this.gameObject); openingImage.SetActive(false); buttons.SetActive(false); }