34 lines
No EOL
1 KiB
C#
34 lines
No EOL
1 KiB
C#
using System;
|
|
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
|
|
try
|
|
{
|
|
Analytics.enabled = false;
|
|
Analytics.deviceStatsEnabled = false;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
} |