private void Awake()
 {
     // Test CheckRegister();
     //CheckRegister();
     phoCon = GameObject.Find("photonScript").GetComponent <PhotonConnect>();
     phoHan = GetComponent <photonHandler>();
 }
Esempio n. 2
0
    private void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
        }
        else
        {
            _instance = this;
        }

        PhotonNetwork.AutomaticallySyncScene = true;
    }
Esempio n. 3
0
    private void Awake()
    {
        progressLabel.text = "";
        _print(true, "Awake");
        roomOptions = new RoomOptions {
            IsVisible = true, IsOpen = true, MaxPlayers = maxPlayersPerRoom
        };
        if (Lobby == null)
        {
            Lobby = this;
        }

        if (Lobby != this)
        {
            Destroy(Lobby.gameObject);
            Lobby = this;
        }

        DontDestroyOnLoad(gameObject);
        _print(true, "Awoke");
    }