37 lines
910 B
C#
37 lines
910 B
C#
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
|
|
}
|