miuu-console-unlocker/PatchEntryPoint.cs
2023-09-07 22:35:16 -04:00

26 lines
499 B
C#

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;
}
}
}
}