miuu-diamond-time-viewer/PatchEntryPoint.cs
2023-10-06 21:26:05 -04:00

26 lines
507 B
C#

using HarmonyLib;
using UnityEngine.SceneManagement;
namespace DiamondTimeViewer
{
public static class PatchEntryPoint
{
private static bool IsPatched;
public static void Start()
{
SceneManager.sceneLoaded += beginPatch;
Config.Init();
}
private static void beginPatch(Scene scene, LoadSceneMode loadSceneMode)
{
if (!IsPatched)
{
new Harmony("com.thearst3rd.diamondtimeviewer").PatchAll();
IsPatched = true;
SceneManager.sceneLoaded -= beginPatch;
}
}
}
}