-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInit.cs
More file actions
36 lines (30 loc) · 893 Bytes
/
Init.cs
File metadata and controls
36 lines (30 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using BepInEx;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using CapuchinTemplate.Patches;
using UnityEngine;
using BepInEx.Logging;
using Il2CppInterop.Runtime.Injection;
namespace NoMoreLoadingScreen
{
[BepInPlugin(ModInfo.GUID, ModInfo.NAME, ModInfo.VERSION)]
public class Init : BasePlugin
{
public Harmony harmonyInstance;
public Plugin pluginInstance;
public static Init initInstance;
public override void Load()
{
harmonyInstance = HarmonyPatcher.Patch(ModInfo.GUID);
initInstance = this;
ClassInjector.RegisterTypeInIl2Cpp<Plugin>();
pluginInstance = AddComponent<Plugin>();
}
public override bool Unload()
{
if (harmonyInstance != null)
HarmonyPatcher.Unpatch(harmonyInstance);
return true;
}
}
}