-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.cs
47 lines (42 loc) · 1.13 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using HarmonyLib;
using IPA;
using IPA.Config;
using IPA.Config.Stores;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.SceneManagement;
using IPALogger = IPA.Logging.Logger;
namespace SongDescriptionButItWorks
{
// Zenject, Sirautil = Dependency Injection
//[Plugin(RuntimeOptions.SingleStartInit)]
[Plugin(RuntimeOptions.DynamicInit)]
public class Plugin
{
internal static Plugin Instance;
internal static IPALogger Log;
internal static Harmony harmony;
[Init]
public Plugin(IPALogger logger, IPA.Config.Config conf)
{
Instance = this;
Log = logger;
//Config.Instance = conf.Generated<Config>();
harmony = new Harmony("Kinsi55.BeatSaber.SongDescriptionButItWorks");
}
[OnEnable]
public void OnEnable()
{
harmony.PatchAll(Assembly.GetExecutingAssembly());
}
[OnDisable]
public void OnDisable()
{
harmony.UnpatchSelf();
}
}
}