Skip to content

API reference ​

Everything a mod uses from Lustral is in the Lustral namespace of Lustral.Api, which the SDK references for you. A mod reaches most of it through its Mod class: Log, Harmony, Config, Events, Coroutines, Assets, Game and Mods.

The mod ​

TypeDescription
ModThe base class of a mod's entry point.
ModInfoA mod's identity, as declared in its manifest (mod.toml).
ILogA log whose messages are tagged with their source.

The game ​

TypeDescription
GameInfoInformation about the running game, as reported by the game itself.
ScriptingBackendThe scripting backend of a Unity game.
GameEventsScene and frame events for a mod.
SceneInfoA Unity scene, represented without Unity types so that it is identical on every backend.

Coroutines ​

TypeDescription
CoroutinesA mod's coroutines: methods that run across multiple frames on the game's main thread, with identical behavior on Mono and IL2CPP.
CoroutineHandleA running coroutine.
WaitA condition that a coroutine waits for: yield return Wait.Seconds(1).

Settings ​

TypeDescription
ModConfigA mod's settings file, Lustral/config/<id>.toml in the game folder.

Assets ​

TypeDescription
ModAssetsLoads Unity asset bundles shipped with a mod, on both Mono and IL2CPP: This also works in IL2CPP games whose builds do not include Unity's AssetBundle class, because Lustral calls the engine directly.
ModAssetBundleA loaded asset bundle (ModAssets.LoadBundle).

Other mods ​

TypeDescription
LoadedModsThe mods Lustral has loaded in the current session, including libraries, in load order.

Mods are third-party software. Lustral does not verify their behavior and is not responsible for any damage they cause.