private void Awake() { DontDestroyOnLoad(gameObject); // Show stacktrace only when it's exception or assert Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None); Application.SetStackTraceLogType(LogType.Warning, StackTraceLogType.None); Application.SetStackTraceLogType(LogType.Error, StackTraceLogType.None); // Check if we are running on a dedicated server instance IsDedicatedServer = File.Exists("rocketstation_DedicatedServer.exe"); if (IsDedicatedServer) { Debug.Log("[Stationeers.Addons - DEDICATED SERVER] Stationeers.Addons is running on a dedicated server!"); } // Check if we can debug addons IsDebuggingEnabled = File.Exists("addons-debugging.enable"); if (IsDebuggingEnabled) { Debug.Log("[Stationeers.Addons - DEBUG] Stationeers.Addons debugging enabled!"); } if (!IsDedicatedServer) // Only look for workshop if on client { Workshop = InitializeModule <WorkshopModule>(); } PluginCompiler = InitializeModule <PluginCompilerModule>(); BundleLoader = InitializeModule <BundleLoaderModule>(); PluginLoader = InitializeModule <PluginLoaderModule>(); Harmony = InitializeModule <HarmonyModule>(); }
private void Awake() { DontDestroyOnLoad(gameObject); // Show stacktrace only when it's exception or assert Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None); Application.SetStackTraceLogType(LogType.Warning, StackTraceLogType.None); Application.SetStackTraceLogType(LogType.Error, StackTraceLogType.None); // Check if we can debug addons IsDebuggingEnabled = File.Exists("addons-debugging.enable"); if (IsDebuggingEnabled) { Debug.Log("[Stationeers.Addons - DEBUG] Stationeers.Addons debugging enabled!"); } Workshop = InitializeModule <WorkshopModule>(); PluginCompiler = InitializeModule <PluginCompilerModule>(); BundleLoader = InitializeModule <BundleLoaderModule>(); PluginLoader = InitializeModule <PluginLoaderModule>(); Harmony = InitializeModule <HarmonyModule>(); }