-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBepInEx.cs
More file actions
36 lines (33 loc) · 910 Bytes
/
BepInEx.cs
File metadata and controls
36 lines (33 loc) · 910 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 HarmonyLib;
using System;
using UnityEngine;
namespace ExamplePatchMod
{
#region BepInEx
[BepInEx.BepInPlugin(pluginGuid, pluginName, pluginVersion)]
public class ExamplePatchMod : BepInEx.BaseUnityPlugin
{
public const string pluginGuid = "com.username.ExamplePatchMod";
public const string pluginName = "ExamplePatchMod";
public const string pluginVersion = "1.0";
public static void Log(string line)
{
Debug.Log("[" + pluginName + "]: " + line);
}
void Awake()
{
try
{
var harmony = new Harmony(pluginGuid);
harmony.PatchAll();
Log("Patch succeeded");
}
catch (Exception e)
{
Log("Patch Failed");
Log(e.ToString());
}
}
}
#endregion
}