26 lines
507 B
C#
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;
|
|
}
|
|
}
|
|
}
|
|
}
|