private IEnumerator Start() { Bootstrap bootstrap = null; int num; Bootstrap.WriteToLog("Bootstrap Startup"); ExceptionReporter.InitializeFromUrl("https://*****:*****@sentry.io/51080"); num = (!Facepunch.Utility.CommandLine.Full.Contains("-official") ? 0 : (int)Facepunch.Utility.CommandLine.Full.Contains("+official")); ExceptionReporter.Disabled = num == 0; Bootstrap.WriteToLog(SystemInfoGeneralText.currentInfo); UnityEngine.Texture.SetGlobalAnisotropicFilteringLimits(1, 16); yield return(bootstrap.StartCoroutine(Bootstrap.LoadingUpdate("Loading Bundles"))); FileSystem.Backend = new AssetBundleBackend("Bundles/Bundles"); if (FileSystem.Backend.isError) { bootstrap.ThrowError(FileSystem.Backend.loadingError); } if (Bootstrap.isErrored) { yield break; } yield return(bootstrap.StartCoroutine(Bootstrap.LoadingUpdate("Loading Game Manifest"))); GameManifest.Load(); yield return(bootstrap.StartCoroutine(Bootstrap.LoadingUpdate("DONE!"))); yield return(bootstrap.StartCoroutine(Bootstrap.LoadingUpdate("Running Self Check"))); SelfCheck.Run(); if (Bootstrap.isErrored) { yield break; } yield return(bootstrap.StartCoroutine(Bootstrap.LoadingUpdate("Bootstrap Tier0"))); Bootstrap.Init_Tier0(); ConsoleSystem.UpdateValuesFromCommandLine(); yield return(bootstrap.StartCoroutine(Bootstrap.LoadingUpdate("Bootstrap Systems"))); Bootstrap.Init_Systems(); yield return(bootstrap.StartCoroutine(Bootstrap.LoadingUpdate("Bootstrap Config"))); Bootstrap.Init_Config(); if (Bootstrap.isErrored) { yield break; } yield return(bootstrap.StartCoroutine(Bootstrap.LoadingUpdate("Loading Items"))); ItemManager.Initialize(); if (Bootstrap.isErrored) { yield break; } yield return(bootstrap.StartCoroutine(bootstrap.DedicatedServerStartup())); GameManager.Destroy(bootstrap.gameObject, 0f); }
private IEnumerator Start() { Bootstrap bootstrap = this; Bootstrap.WriteToLog("Bootstrap Startup"); Bootstrap.WriteToLog(SystemInfoGeneralText.currentInfo); Texture.SetGlobalAnisotropicFilteringLimits(1, 16); yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(Bootstrap.LoadingUpdate("Loading Bundles"))); FileSystem.Backend = (FileSystemBackend) new AssetBundleBackend("Bundles/Bundles"); if (FileSystem.Backend.isError != null) { bootstrap.ThrowError((string)FileSystem.Backend.loadingError); } if (!Bootstrap.isErrored) { yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(Bootstrap.LoadingUpdate("Loading Game Manifest"))); GameManifest.Load(); yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(Bootstrap.LoadingUpdate("DONE!"))); yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(Bootstrap.LoadingUpdate("Running Self Check"))); SelfCheck.Run(); if (!Bootstrap.isErrored) { yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(Bootstrap.LoadingUpdate("Bootstrap Tier0"))); Bootstrap.Init_Tier0(); ConsoleSystem.UpdateValuesFromCommandLine(); yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(Bootstrap.LoadingUpdate("Bootstrap Systems"))); Bootstrap.Init_Systems(); yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(Bootstrap.LoadingUpdate("Bootstrap Config"))); Bootstrap.Init_Config(); if (!Bootstrap.isErrored) { yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(Bootstrap.LoadingUpdate("Loading Items"))); ItemManager.Initialize(); if (!Bootstrap.isErrored) { yield return((object)((MonoBehaviour)bootstrap).StartCoroutine(bootstrap.DedicatedServerStartup())); GameManager.Destroy(((Component)bootstrap).get_gameObject(), 0.0f); } } } } }
private IEnumerator Start() { WriteToLog("Bootstrap Startup"); BenchmarkTimer.Enabled = Facepunch.Utility.CommandLine.Full.Contains("+autobench"); BenchmarkTimer timer = BenchmarkTimer.New("bootstrap"); if (!UnityEngine.Application.isEditor) { ExceptionReporter.InitializeFromUrl("https://*****:*****@sentry.io/51080"); ExceptionReporter.Disabled = !Facepunch.Utility.CommandLine.Full.Contains("-official") && !Facepunch.Utility.CommandLine.Full.Contains("-server.official") && !Facepunch.Utility.CommandLine.Full.Contains("+official") && !Facepunch.Utility.CommandLine.Full.Contains("+server.official"); BuildInfo current = BuildInfo.Current; if (current.Scm.Branch != null && current.Scm.Branch.StartsWith("main")) { ExceptionReporter.InitializeFromUrl("https://*****:*****@sentry.io/1836389"); ExceptionReporter.Disabled = false; } } if (AssetBundleBackend.Enabled) { AssetBundleBackend newBackend = new AssetBundleBackend(); using (BenchmarkTimer.New("bootstrap;bundles")) { yield return(StartCoroutine(LoadingUpdate("Opening Bundles"))); newBackend.Load("Bundles/Bundles"); FileSystem.Backend = newBackend; } if (FileSystem.Backend.isError) { ThrowError(FileSystem.Backend.loadingError); yield break; } using (BenchmarkTimer.New("bootstrap;bundlesindex")) { newBackend.BuildFileIndex(); } } if (FileSystem.Backend.isError) { ThrowError(FileSystem.Backend.loadingError); yield break; } if (!UnityEngine.Application.isEditor) { WriteToLog(SystemInfoGeneralText.currentInfo); } UnityEngine.Texture.SetGlobalAnisotropicFilteringLimits(1, 16); if (isErrored) { yield break; } using (BenchmarkTimer.New("bootstrap;gamemanifest")) { yield return(StartCoroutine(LoadingUpdate("Loading Game Manifest"))); GameManifest.Load(); yield return(StartCoroutine(LoadingUpdate("DONE!"))); } using (BenchmarkTimer.New("bootstrap;selfcheck")) { yield return(StartCoroutine(LoadingUpdate("Running Self Check"))); SelfCheck.Run(); } if (isErrored) { yield break; } yield return(StartCoroutine(LoadingUpdate("Bootstrap Tier0"))); using (BenchmarkTimer.New("bootstrap;tier0")) { Init_Tier0(); } using (BenchmarkTimer.New("bootstrap;commandlinevalues")) { ConsoleSystem.UpdateValuesFromCommandLine(); } yield return(StartCoroutine(LoadingUpdate("Bootstrap Systems"))); using (BenchmarkTimer.New("bootstrap;init_systems")) { Init_Systems(); } yield return(StartCoroutine(LoadingUpdate("Bootstrap Config"))); using (BenchmarkTimer.New("bootstrap;init_config")) { Init_Config(); } if (!isErrored) { yield return(StartCoroutine(LoadingUpdate("Loading Items"))); using (BenchmarkTimer.New("bootstrap;itemmanager")) { ItemManager.Initialize(); } if (!isErrored) { yield return(StartCoroutine(DedicatedServerStartup())); timer?.Dispose(); GameManager.Destroy(base.gameObject); } } }