-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.cs
More file actions
47 lines (40 loc) · 1.47 KB
/
Plugin.cs
File metadata and controls
47 lines (40 loc) · 1.47 KB
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 IPA;
using IPA.Config;
using IPA.Config.Stores;
using UnityEngine;
using IPALogger = IPA.Logging.Logger;
namespace ReplayRenderer
{
[Plugin(RuntimeOptions.SingleStartInit)]
public class Plugin
{
internal static Plugin Instance { get; private set; }
internal static IPALogger Log { get; private set; }
internal static PluginConfig Config { get; private set; }
[Init]
public void Init(IPALogger logger, Config conf)
{
Instance = this;
Log = logger;
Config = conf.Generated<PluginConfig>();
Log.Info("ReplayRenderer initialized.");
}
[OnStart]
public void OnApplicationStart()
{
Log.Info("ReplayRenderer starting...");
// Register our manager component that will persist across scenes
new GameObject("ReplayRendererManager").AddComponent<RenderManager>();
GameObject.DontDestroyOnLoad(GameObject.Find("ReplayRendererManager"));
// Register BeatLeader UI integration
new GameObject("BeatLeaderUIIntegration").AddComponent<BeatLeaderUIIntegration>();
GameObject.DontDestroyOnLoad(GameObject.Find("BeatLeaderUIIntegration"));
Log.Info("ReplayRenderer started successfully.");
}
[OnExit]
public void OnApplicationQuit()
{
Log.Info("ReplayRenderer shutting down.");
}
}
}