Files
Sinmai-Assist/Common/DisableMask.cs
2025-10-13 18:18:47 +08:00

24 lines
675 B
C#

using System;
using HarmonyLib;
using MelonLoader;
using UnityEngine;
namespace SinmaiAssist.Common;
public class DisableMask
{
[HarmonyPrefix]
[HarmonyPatch(typeof(Main.GameMain), "LateInitialize", new System.Type[] { typeof(MonoBehaviour), typeof(Transform), typeof(Transform) })]
public static bool LateInitialize(MonoBehaviour gameMainObject, ref Transform left, ref Transform right)
{
try
{
GameObject.Find("Mask").SetActive(false);
}
catch (Exception e)
{
MelonLogger.Warning("Maybe the current Sinmai build does not have GameObject \"Mask\".");
}
return true;
}
}