-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMain.cs
75 lines (62 loc) · 2.81 KB
/
Main.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using MelonLoader;
namespace TestMod
{
public static class BuildInfo
{
public const string Name = "TestMod"; // Name of the Mod. (MUST BE SET)
public const string Description = "Mod for Testing"; // Description for the Mod. (Set as null if none)
public const string Author = "TestAuthor"; // Author of the Mod. (MUST BE SET)
public const string Company = null; // Company that made the Mod. (Set as null if none)
public const string Version = "1.0.0"; // Version of the Mod. (MUST BE SET)
public const string DownloadLink = null; // Download Link for the Mod. (Set as null if none)
}
public class TestMod : MelonMod
{
public override void OnInitializeMelon() {
MelonLogger.Msg("OnApplicationStart");
}
public override void OnLateInitializeMelon() // Runs after OnApplicationStart.
{
MelonLogger.Msg("OnApplicationLateStart");
}
public override void OnSceneWasLoaded(int buildindex, string sceneName) // Runs when a Scene has Loaded and is passed the Scene's Build Index and Name.
{
MelonLogger.Msg("OnSceneWasLoaded: " + buildindex.ToString() + " | " + sceneName);
}
public override void OnSceneWasInitialized(int buildindex, string sceneName) // Runs when a Scene has Initialized and is passed the Scene's Build Index and Name.
{
MelonLogger.Msg("OnSceneWasInitialized: " + buildindex.ToString() + " | " + sceneName);
}
public override void OnSceneWasUnloaded(int buildIndex, string sceneName) {
MelonLogger.Msg("OnSceneWasUnloaded: " + buildIndex.ToString() + " | " + sceneName);
}
public override void OnUpdate() // Runs once per frame.
{
MelonLogger.Msg("OnUpdate");
}
public override void OnFixedUpdate() // Can run multiple times per frame. Mostly used for Physics.
{
MelonLogger.Msg("OnFixedUpdate");
}
public override void OnLateUpdate() // Runs once per frame after OnUpdate and OnFixedUpdate have finished.
{
MelonLogger.Msg("OnLateUpdate");
}
public override void OnGUI() // Can run multiple times per frame. Mostly used for Unity's IMGUI.
{
MelonLogger.Msg("OnGUI");
}
public override void OnApplicationQuit() // Runs when the Game is told to Close.
{
MelonLogger.Msg("OnApplicationQuit");
}
public override void OnPreferencesSaved() // Runs when Melon Preferences get saved.
{
MelonLogger.Msg("OnPreferencesSaved");
}
public override void OnPreferencesLoaded() // Runs when Melon Preferences get loaded.
{
MelonLogger.Msg("OnPreferencesLoaded");
}
}
}