miuu-spreadsheet-helper/PatchEntryPoint.cs

27 lines
503 B
C#
Raw Permalink Normal View History

2023-09-30 01:42:18 -04:00
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;
}
}
}
}