Initial commit: add source files and project

This commit is contained in:
2025-10-19 19:32:44 +02:00
parent 2395b2ca01
commit 8139df0822
5 changed files with 227 additions and 0 deletions

29
ToggleHUD/main.cs Normal file
View File

@@ -0,0 +1,29 @@
using System.Reflection;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;
using UnityEngine.UI;
[BepInPlugin("com.gabizar.togglehud", "Toggle HUD Mod", "0.1.0 ")]
public class ToggleHUD: BaseUnityPlugin
{
private void Awake()
{
Logger.LogInfo("Toggle HUD mod loaded and initialized.");
Harmony.CreateAndPatchAll(typeof(ToggleHUD), null);
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.F11))
{
HudGlobalHide.IsHidden = !HudGlobalHide.IsHidden;
Logger.LogInfo($"HUD hidden = {HudGlobalHide.IsHidden}");
}
}
}