generated from Captain-Of-Coit/cities-skylines-2-mod-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlugin.cs
29 lines (24 loc) · 953 Bytes
/
Plugin.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
using System.Linq;
using System.Reflection;
using BepInEx;
using HarmonyLib;
#if BEPINEX_V6
using BepInEx.Unity.Mono;
#endif
namespace AlphaDLSSEnabler
{
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
Logger.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!");
var harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), MyPluginInfo.PLUGIN_GUID + "_Cities2Harmony");
var patchedMethods = harmony.GetPatchedMethods().ToArray();
Logger.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} made patches! Patched methods: " + patchedMethods.Length);
foreach (var patchedMethod in patchedMethods) {
Logger.LogInfo($"Patched method: {patchedMethod.Module.Name}:{patchedMethod.Name}");
}
}
}
}