miuu-diamond-time-viewer/Patcher.cs

29 lines
552 B
C#
Raw Normal View History

2023-08-21 19:05:40 -04:00
using System;
using System.Collections.Generic;
using System.Text;
using HarmonyLib;
using UnityEngine.SceneManagement;
namespace MiuuDiamondTimeViewer
{
public static class Patcher
{
private static bool IsPatched;
public static void OnStartup()
{
SceneManager.sceneLoaded += beginPatch;
}
private static void beginPatch(Scene scene, LoadSceneMode loadSceneMode)
{
if (!IsPatched)
{
new Harmony("com.thearst3rd.diamondviewer").PatchAll();
IsPatched = true;
SceneManager.sceneLoaded -= beginPatch;
}
}
}
}