miuu-console-unlocker/PatchEntryPoint.cs

27 lines
499 B
C#
Raw Normal View History

2023-09-07 22:30:30 -04:00
using HarmonyLib;
using System;
using UnityEngine.SceneManagement;
namespace ConsoleUnlocker
{
public static class PatchEntryPoint
{
private static bool IsPatched;
public static void Start()
{
SceneManager.sceneLoaded += beginPatch;
}
private static void beginPatch(Scene scene, LoadSceneMode loadSceneMode)
{
if (!IsPatched)
{
new Harmony("com.thearst3rd.consoleunlocker").PatchAll();
IsPatched = true;
SceneManager.sceneLoaded -= beginPatch;
}
}
}
}