Initial commit
This commit is contained in:
36
ExamplePatchMod/BepInEx.cs
Normal file
36
ExamplePatchMod/BepInEx.cs
Normal file
@@ -0,0 +1,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
|
||||
}
|
||||
Reference in New Issue
Block a user