34 lines
730 B
C#
34 lines
730 B
C#
using BepInEx;
|
|
using HarmonyLib;
|
|
using Rizu.Core;
|
|
|
|
namespace Rizu.BepInEx;
|
|
|
|
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
|
|
[BepInProcess("Sinmai.exe")]
|
|
public class RizuPlugin : BaseUnityPlugin
|
|
{
|
|
public static RizuPlugin Instance { get; private set; }
|
|
|
|
private Harmony _harmony;
|
|
|
|
private void Awake()
|
|
{
|
|
Instance = this;
|
|
|
|
Exporter.Instance.LoadConfig();
|
|
|
|
if (!Exporter.Instance.IsEnabled)
|
|
{
|
|
return;
|
|
}
|
|
|
|
_harmony = new Harmony(MyPluginInfo.PLUGIN_GUID);
|
|
_harmony.PatchAll();
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
_harmony?.UnpatchSelf();
|
|
}
|
|
} |