diff --git a/ContentAPI/Patches/Fixes/DebugUIHandlerPatch.cs b/ContentAPI/Patches/Fixes/DebugUIHandlerPatch.cs new file mode 100644 index 0000000..5d5197d --- /dev/null +++ b/ContentAPI/Patches/Fixes/DebugUIHandlerPatch.cs @@ -0,0 +1,26 @@ +namespace ContentAPI.Patches.Fixes +{ +#pragma warning disable SA1313 +#pragma warning disable SA1402 + using HarmonyLib; + using UnityEngine; + using Zorro.Core.CLI; + + /// + /// Patch for adding back the debug ui. + /// + [HarmonyPatch(typeof(DebugUIHandler), "Update")] + internal class DebugUIHandlerPatch + { + private static void Postfix(DebugUIHandler __instance) + { + if (Input.GetKeyDown(KeyCode.F1)) + { + if (__instance.IsOpen) + __instance.Hide(); + else + __instance.Show(); + } + } + } +} \ No newline at end of file