27 lines
483 B
C#
27 lines
483 B
C#
|
using HarmonyLib;
|
|||
|
using System;
|
|||
|
using UnityEngine.SceneManagement;
|
|||
|
|
|||
|
namespace Sandbox
|
|||
|
{
|
|||
|
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.sandbox").PatchAll();
|
|||
|
IsPatched = true;
|
|||
|
SceneManager.sceneLoaded -= beginPatch;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|