Mod Methods |
The Mod type exposes the following members.
Name | Description | |
---|---|---|
BroadcastMessage(String) |
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity but the message will only be sent to modded scripts.
Allows the developer to implement event callbacks similar to mono behaviour messages such as OnTriggerEnter.
| |
BroadcastMessage(String, Object) |
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity but the message will only be sent to modded scripts.
Allows the developer to implement event callbacks similar to mono behaviour messages such as OnTriggerEnter.
This overload allows a single value to be passed as an argument.
| |
BroadcastMessage(String, Object) |
Allows the developer to trigger an event that mod classes may listen to.
Works in a similar way to the 'SendMessage' method of Unity but the message will only be sent to modded scripts.
Allows the developer to implement event callbacks similar to mono behaviour messages such as OnTriggerEnter.
This overload allows an undefined number of values to be apssed as arguments.
| |
GetLoadedMod(String) |
Attempts to get the ModHost for a loaded mod with the specified name.
If the mod is not loaded then the return value will be null.
| |
GetLoadedMod(Uri) |
Attempts to get the ModHost for a loaded mod at the specified path.
If the mod is not loaded then the return value will be null.
| |
GetLoadedMod(String, String) |
Attempts to get the ModHost for a loaded mod with the specified name and version.
If a mod with the same name but different version is loaded then the return value will still be null (Explicit match).
If the mod is not loaded then the return value will be null.
| |
GetSharedAsyncHandler | ||
IsModLoaded(String) |
Checks whether a mod with the specified name is currently loaded by any ModHost.
| |
IsModLoaded(Uri) |
Checks whether the mod at the specified path is currently loaded by any ModHost.
| |
IsModLoaded(String, String) |
Checks whether a mod with the specified name and version is currently loaded by any ModHost.
If a mod with a matching name is found but the version is not the same then the return value will be false.
| |
Load | ||
LoadAll |
Loads all mods that are installed in the ModDirectory.
A ModHost will be created for each path specified.
If no mods are installed then this method will return an empty array.
| |
LoadAllAsync |
Loads all mods that are installed in the ModDirectory asynchronously.
A ModHost will be created to manage the mod and returned as the result of the async operation.
If no mods are installed then this method will return an empty array.
The async operation will not be complete until all mods have finished loading.
| |
LoadAsync |
Load all mods from the specified paths asynchronously.
A ModHost array will be created to manage the mod and returned as the result of the async operation.
| |
LoadBatch |
Load all mods from the specified paths.
A ModHost will be created for each path specified.
| |
LoadBatchAsync | ||
ParseAndLoadCommandLine |
Parse all mod paths from the command line and load all mods.
| |
ParseAndLoadCommandLineAsync |
Parse all mods from the command line and load asll asynchronously.
| |
UnloadAllMods |
Accesses all loaded mods and calls UnloadMod(Boolean) to free the host.
Helper method to quickly unload all loaded mods.
| |
UnloadUnusedAssets |