miuu-custom-cosmetic-loader/PatchEntryPoint.cs
2023-08-26 12:29:43 -04:00

26 lines
508 B
C#

using HarmonyLib;
using System;
using UnityEngine.SceneManagement;
namespace CustomCosmeticLoader
{
public static class PatchEntryPoint
{
private static bool IsPatched = false;
public static void Start()
{
SceneManager.sceneLoaded += beginPatch;
}
private static void beginPatch(Scene scene, LoadSceneMode mode)
{
if (!IsPatched)
{
new Harmony("com.thearst3rd.customcosmeticloader").PatchAll();
IsPatched = true;
SceneManager.sceneLoaded -= beginPatch;
}
}
}
}