Ejemplo n.º 1
0
        // --------------------------------------------------------------------
        void Awake()
        {
            // Ensure only 1 singleton
            if (null != _Singleton)
            {
                UnityEngine.Debug.LogError("SceneLoader: Multiple SceneLoaders violate Singleton pattern.");
            }
            _Singleton = this;

            // Initialize the Logger
            logger.Initialize();

            // Trace Startup
            ARKLogger.LogMessage(eLogCategory.Control,
                                 eLogLevel.Info,
                                 "SceneLoader: Awake.");

            // Init the FPS Tracker
            InitFPS();

            // Are we in the Application Scene?
            if (SceneManager.GetActiveScene().name == "Entry")
            {
            #if !FINAL
                // Load the Debug Scene Selector
                ARKLogger.LogMessage(eLogCategory.Control,
                                     eLogLevel.Info,
                                     "SceneLoader: Loading SceneSelector");
                _CurrentScene = "Launcher";
                SceneManager.LoadScene(_CurrentScene);
            #endif
            }

            // Make sure this object persists between scene loads.
            DontDestroyOnLoad(gameObject);
        }