forked from FizzyApple12/DiscordCore
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlugin.cs
37 lines (30 loc) · 770 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
30
31
32
33
34
35
36
37
using IPA;
using UnityEngine;
namespace DiscordCore
{
[Plugin(RuntimeOptions.SingleStartInit)]
public class Plugin
{
internal const string Name = "DiscordCore";
internal static IPA.Logging.Logger log;
protected GameObject manager;
[Init]
public void Init(IPA.Logging.Logger log)
{
Plugin.log = log;
manager = new GameObject("DiscordManager");
manager.AddComponent<DiscordManager>();
SettingsMenuManager.Initialize();
}
[OnEnable]
public void OnEnable()
{
manager.SetActive(true);
}
[OnDisable]
public void OnDisable()
{
manager.SetActive(false);
}
}
}