上传文件至 Common
This commit is contained in:
24
Common/DisableMask.cs
Normal file
24
Common/DisableMask.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user