generated from acidbubbles/vam-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyPlugin.cs
52 lines (48 loc) · 1.14 KB
/
MyPlugin.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
48
49
50
51
52
using System;
public class MyPlugin : MVRScript
{
public override void Init()
{
try
{
SuperController.LogMessage($"{nameof(MyPlugin)} initialized");
}
catch (Exception e)
{
SuperController.LogError($"{nameof(MyPlugin)}.{nameof(Init)}: {e}");
}
}
public void OnEnable()
{
try
{
SuperController.LogMessage($"{nameof(MyPlugin)} enabled");
}
catch (Exception e)
{
SuperController.LogError($"{nameof(MyPlugin)}.{nameof(OnEnable)}: {e}");
}
}
public void OnDisable()
{
try
{
SuperController.LogMessage($"{nameof(MyPlugin)} disabled");
}
catch (Exception e)
{
SuperController.LogError($"{nameof(MyPlugin)}.{nameof(OnDisable)}: {e}");
}
}
public void OnDestroy()
{
try
{
SuperController.LogMessage($"{nameof(MyPlugin)} destroyed");
}
catch (Exception e)
{
SuperController.LogError($"{nameof(MyPlugin)}.{nameof(OnDestroy)}: {e}");
}
}
}