mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
28 lines
759 B
C#
28 lines
759 B
C#
using UnityEngine;
|
|
|
|
namespace EHR;
|
|
|
|
public static class DebugModeManager
|
|
{
|
|
public static bool AmDebugger { get; private set; } =
|
|
#if DEBUG
|
|
true;
|
|
#else
|
|
false;
|
|
#endif
|
|
public static bool IsDebugMode => AmDebugger && EnableDebugMode != null && EnableDebugMode.GetBool();
|
|
public static OptionItem EnableDebugMode;
|
|
|
|
public static void Auth(HashAuth auth, string input)
|
|
{
|
|
AmDebugger = AmDebugger || auth.CheckString(input);
|
|
}
|
|
|
|
public static void SetupCustomOption()
|
|
{
|
|
EnableDebugMode = BooleanOptionItem.Create(2, "EnableDebugMode", false, TabGroup.SystemSettings, true)
|
|
.SetHeader(true)
|
|
.SetColor(Color.green)
|
|
.SetHidden(!AmDebugger);
|
|
}
|
|
} |