Click or drag to resize

ModScriptBehaviour Class

Provides the same functionality as the mono behaviour class but adds access to the modding interface for ease of use. Provides similar functionality to the ModScript class but also inherits from MonoBehaviour. Modders should inherit from this class to access the uMod API.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          UModModScriptBehaviour

Namespace:  UMod
Assembly:  UMod-Interface (in UMod-Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public abstract class ModScriptBehaviour : MonoBehaviour, 
	IMod, IModContext

The ModScriptBehaviour type exposes the following members.

Constructors
  NameDescription
Protected methodModScriptBehaviour
Initializes a new instance of the ModScriptBehaviour class
Top
Properties
  NameDescription
Public propertyGameAssets
A reference to the IGameAssets interface that allows access to shared game assets.
Public propertyModAssets
A reference to the IModAssets interface that allows access to the loading API. You should not access this property from 'Awake'. Instead use 'Start' or 'OnModLoaded'.
Public propertyModDebug
A reference to the IModDebug interface that allows access to the mod debug API.
Public propertyModHost
A reference to the IModHost interface that allows access to the host that is handling this mod. You should not access this property from 'Awake'. Instead use 'Start' or 'OnModLoaded'.
Public propertyModPersistentData
A reference to the IModPersistentData interface that allows data to be stored between sessions. This is useful for storing mod configuration values and then loading them back at a later date.
Public propertyModScenes
A reference to the IModScenes interface that allows access to the mod scenes. You should not access this property from 'Awake'. Instead use 'Start' or 'OnModLoaded'.
Public propertyModSecurity
A reference to the IModSecurity interface that allows access to the mod security permissions at runtime. This is useful for determining whether the mod has permission to perform an action before hand. You should not access this property from 'Awake'. Instead use 'Start' or 'OnModLoaded'.
Top
Methods
  NameDescription
Public methodOnModLoaded
Event method triggered when the mod has been successfully loaded. Use this method for mod setup code, similar to Unity's Start method.
Public methodOnModUnload
Event method triggered just before the mod will be unloaded from the game. Use this method for mod cleanup code, similar to Unity's OnDestroy method. Note that you are not required to unload asset created by this mod as they will be cleaned up automatically. ///
Public methodOnModUpdate
Event method triggered when the mod will be updated. Typically will be the frame rate of the game however excessive time spent in mod methods may result in throttling of this method. Use this method for mod update code, similar to Unity'S Update method
Top
See Also