miuu-spreadsheet-helper/PatchEntryPoint.cs
2023-09-30 01:42:18 -04:00

26 lines
503 B
C#

using HarmonyLib;
using System;
using UnityEngine.SceneManagement;
namespace SpreadsheetHelper
{
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.spreadsheethelper").PatchAll();
IsPatched = true;
SceneManager.sceneLoaded -= beginPatch;
}
}
}
}