Example #1
0
        void OnClientConnectInternal(NetworkConnection conn, ConnectMessage message)
        {
            if (LogFilter.Debug)
            {
                Debug.Log("NetworkManager.OnClientConnectInternal");
            }

            string loadedSceneName = SceneManager.GetActiveScene().name;

            if (string.IsNullOrEmpty(onlineScene) || onlineScene == offlineScene || loadedSceneName == onlineScene)
            {
                clientLoadedScene = false;
                OnClientConnect(conn);
            }
            else
            {
                // will wait for scene id to come from the server.
                clientReadyConnection = conn;
            }
        }