miuu-custom-cosmetic-loader/PatchEntryPoint.cs

27 lines
508 B
C#
Raw Normal View History

2023-08-26 12:29:43 -04:00
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;
}
}
}
}