diff --git a/Addons/Helper.cs b/Addons/Helper.cs index d53cef5..b674c1c 100644 --- a/Addons/Helper.cs +++ b/Addons/Helper.cs @@ -4,6 +4,8 @@ using UnityEngine.Analytics; namespace GBSU.Addons; public class Helper { + public static string RotationFolderPath = Application.dataPath + "/Config/Rotation/"; + public static string GameConfigPath = RotationFolderPath + "config.json"; public static void DisableAnalytics() { // Try disabling analytics https://docs.unity3d.com/ScriptReference/Analytics.Analytics-deviceStatsEnabled.html @@ -17,4 +19,16 @@ public class Helper Plugin.Log.LogWarning("Failed to disable analytics: " + e.Message); } } + public static void CreateRotationFolder() + { + try + { + Plugin.Log.LogInfo("Creating rotation folder at " + RotationFolderPath); + Directory.CreateDirectory(RotationFolderPath); + } + catch (Exception e) + { + Plugin.Log.LogError("Could not create rotation folder path: " + e.Message); + } + } } \ No newline at end of file diff --git a/Plugin.cs b/Plugin.cs index 81e98a0..ac523ee 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -49,6 +49,11 @@ public class Plugin : BaseUnityPlugin GBSUCompInit(); Helper.DisableAnalytics(); // thank me later + + // create server config path + Helper.CreateRotationFolder(); + + Log.LogDebug("Server game config should be found at " + Helper.GameConfigPath); } private static void GBSUCompInit()