private void Awake() { DontDestroyOnLoad(this); Instance = this; Name = "Player #" + Random.Range(0, 9999); }
private void Awake() { if (Instance != null) { return; } DontDestroyOnLoad(this); Instance = this; }
// Update is called once per frame private void Awake() { DontDestroyOnLoad(this); Instance = this; Name = "Player #" + Random.Range(0, 9999); photonView = gameObject.GetComponent <PhotonView>(); photonView.name = Name; }
// Use this for initialization private void Awake() { Instance = this; PhotonView = GetComponent <PhotonView>(); PlayerName = "Distul#" + Random.Range(1000, 9999); PhotonNetwork.sendRate = 60; PhotonNetwork.sendRateOnSerialize = 30; SceneManager.sceneLoaded += OnSceneFinishedLoading; }