示例#1
0
        private IEnumerator InitializeAsync(UEngine engine)
        {
            DebugUtility.Log(LoggerTags.Engine, "EngineLoop.InitializeAsync: {0}", Time.realtimeSinceStartup);
            if (!initialized)
            {
                // Initialize the preload manager
                yield return(engine.StartCoroutine(PreloadManager.GetOrAlloc().Initialize()));

                // apply engine settings
                var engineConfig = EngineSettings.GetOrLoad();
                if (engineConfig != null)
                {
                    DebugUtility.Initialize(engineConfig.loggerSettings);
                }
                // Initialize the modules
                yield return(engine.StartCoroutine(ModuleManager.Get().OnModuleInitialize(engine)));

                initialized = true;
            }

            DebugUtility.Log(LoggerTags.Engine, "EngineLoop.InitializeAsync done: {0}", Time.realtimeSinceStartup);
        }
示例#2
0
 public IEnumerator Initialize(UEngine engine)
 {
     yield return(engine.StartCoroutine(InitializeAsync(engine)));
 }