26 lines
485 B
C#
26 lines
485 B
C#
|
using HarmonyLib;
|
|||
|
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;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|