-
Notifications
You must be signed in to change notification settings - Fork 38
SpaceWarp.API.Mods.Mod
cheese3660 edited this page Feb 25, 2023
·
1 revision
public abstract class Mod : KerbalMonobehaviour
{
public BaseModLogger Logger;
public ModInfo info;
public virtual void Initialize()
{
ModLocator.Add(this);
DontDestroyOnLoad(gameObject);
}
public abstract void OnInitialized();
}
The mod specific logger, described in the BaseModLogger page
The C# representation of the modinfo.json file for this mod
This is called when the mod is first loaded, it is loaded after dependencies at this point, to extend this make sure to do base.Initialize()
in the subclass
This is called after all mods are loaded, this should be your default entrypoint