-
Notifications
You must be signed in to change notification settings - Fork 2
/
TemplateMod.cs
45 lines (35 loc) · 1.32 KB
/
TemplateMod.cs
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
37
38
39
40
41
42
43
44
45
using System;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using UnityEngine;
#pragma warning disable CS0618
[module: UnverifiableCode]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
namespace TemplateMod;
[BepInPlugin(ModInfo.PLUGIN_GUID, ModInfo.PLUGIN_NAME, ModInfo.PLUGIN_VERSION)]
public class TemplateMod : BaseUnityPlugin
{
private Harmony _harmony;
private void Awake()
{
_harmony = new Harmony($"{ModInfo.PLUGIN_GUID}");
_harmony.PatchAll();
UnityEngine.Debug.Log($"Hello from {ModInfo.PLUGIN_NAME}!");
UnityEngine.Debug.Log($"Application version is ${Application.version}.");
SetupMonomodHooks();
}
// Uncomment the following stuff if you want to use AutoHookGenPatcher / HookGen
// Also comment out the Harmony patch if you do so
// (you'll need MMHOOK_Assembly-CSharp.dll)
private void SetupMonomodHooks()
{
//On.MainMenuManager.Set_MenuCondition += MainMenuManager_Set_MenuCondition;
}
//public void MainMenuManager_Set_MenuCondition(On.MainMenuManager.orig_Set_MenuCondition orig, MainMenuManager self, int _index)
//{
// orig(self, _index);
// self._versionDisplayText.text = Application.version + " with Mods :D";
//}
}