feat: create config folder at runtime
This commit is contained in:
parent
05256ecd8a
commit
4b7b22aad4
2 changed files with 19 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue