Click or drag to resize

ModBehaviour Methods

The ModBehaviour type exposes the following members.

Methods
  NameDescription
Public methodBroadcastModMessage(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. An example would be triggering a game over message to inform the mod that the game has ended.
Public methodBroadcastModMessage(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. This overload allows a single value to be passed as an argument. An example would be triggering a game over message to inform the mod that the game has ended.
Public methodBroadcastModMessage(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. This overload allows an any number of values to be passed as arguments, Referenced Unity types are allowed. An example would be triggering a game over message to inform the mod that the game has ended.
Protected methodOnModLoaded
Event method triggered when a mod host has successfully loaded a mod. This method provides the same callback behaviour as subscribing to the OnLoadComplete event.
Protected methodOnModUnloaded
Event method triggered when a mod host has successfully un-loaded a mod. This method provides the same callback behaviour as subscribing to the OnModUnloaded event.
Public methodVirtualMessage(String)
Allows the developer to trigger a callback that inheriting mod classes may listen for. Works in a similar way to the 'SendMessage' method of Unity except that only mod classes inheriting from this class can be triggered. An example would be triggering a damage message to indicate to modders that this object is taking damage.
Public methodVirtualMessage(String, Object)
Allows the developer to trigger a callback that inheriting mod classes may listen for. Works in a similar way to the 'SendMessage' method of Unity except that only mod classes inheriting from this class can be triggered. This overload allows a single argument to be passed. An example would be triggering a damage message to indicate to modders that this object is taking damage.
Public methodVirtualMessage(String, Object)
Allows the developer to trigger a callback that inheriting mod classes may listen for. Works in a similar way to the 'SendMessage' method of Unity except that only mod classes inheriting from this class can be triggered. This overload allows an undefined number of arguments to be passed. An example would be triggering a damage message to indicate to modders that this object is taking damage.
Top
See Also