void Awake() { try { Log.Info("TMPELifecycle.Awake()"); Instance = this; #if BENCHMARK Benchmark.BenchmarkManager.Setup(); #endif TranslationDatabase.LoadAllTranslations(); VersionUtil.LogEnvironmentDetails(); Log._Debug("Scene is " + Scene); // check for incompatible mods if (UIView.GetAView() != null) { // when TM:PE is enabled in content manager CompatibilityCheck(); } else { // or when game first loads if TM:PE was already enabled LoadingManager.instance.m_introLoaded += CompatibilityCheck; } HarmonyHelper.EnsureHarmonyInstalled(); LoadingManager.instance.m_levelPreLoaded += Preload; InGameHotReload = InGameOrEditor(); if (InGameHotReload) { Preload(); SerializableDataExtension.Load(); Load(); } #if DEBUG const bool installHarmonyASAP = false; // set true for fast testing if (installHarmonyASAP) { HarmonyHelper.DoOnHarmonyReady(Patcher.Install); } #endif } catch (Exception ex) { ex.LogException(true); } }
static LoadingExtension() { TranslationDatabase.LoadAllTranslations(); }