Click or drag to resize

ModHost Methods

The ModHost type exposes the following members.

Methods
  NameDescription
Public methodActivate
Activates all mod content. All mod asset and scene information will become available. The default scene may be loaded depending upon the mod settings. All mod entry point scripts will be security checked, initialized and executed.
Public methodStatic memberCreateNewHost
Static methods that provides a quick and simple method of creating a new mod host component in the scene. The method will create associated game objects and dependant components automatically to ensure that the created host is valid.
Public methodDestroyModObjects
Destroys all active game objects that have been created by this mod. This may be called automatically as a result of calling UnloadMod depending upon the value of cleanupModObjects. This method needs the mod to be loaded in order to succeed. If the mod has been unloaded and this method is called then it will fail silently.
Public methodStatic memberIsModInUse
Returns true if any mod host currently has the specified mod loaded. This method is used to avoid shared memory corruption which orrurs when the shared mod data is accessed by 2 different mod hosts.
Public methodUnloadMod
Attempts to unload the mod owned by this host. If the host does not have a mod loaded then no action is taken.
Public methodUnloadMod(Boolean)
Attempts to unload the mod owned by this host. Depending on settings this may cause all mod related game objects to also be destroyed. If the host does not have a mod loaded then no action is taken.
Top
Explicit Interface Implementations
See Also