Interface IPlugin
Interface for BSIPA plugins. Every class that implements this will be loaded if the DLL is placed at <install dir>/Plugins.
Namespace: IPA
Assembly: IPA.Loader.dll
Syntax
[Obsolete("Use the attribute-based system instead.")]
public interface IPlugin
Remarks
Mods implemented with this interface should handle being enabled at runtime properly, unless marked with the "no-runtime-enable" feature.
Methods
| Improve this Doc View SourceOnActiveSceneChanged(Scene, Scene)
Gets invoked whenever a scene is changed
Declaration
void OnActiveSceneChanged(Scene prevScene, Scene nextScene)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.SceneManagement.Scene | prevScene | The Scene that was previously loaded |
UnityEngine.SceneManagement.Scene | nextScene | The Scene being loaded |
OnApplicationQuit()
Gets invoked when the application is closed.
Declaration
void OnApplicationQuit()
OnEnable()
Called when a plugin is enabled. This is where you should set up Harmony patches and the like.
Declaration
void OnEnable()
Remarks
This will be called after Init
, and will be called when the plugin loads normally too.
When a plugin is disabled at startup, neither this nor Init will be called until it is enabled.
Init will only ever be called once.
OnSceneLoaded(Scene, LoadSceneMode)
Gets invoked whenever a scene is loaded.
Declaration
void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.SceneManagement.Scene | scene | The scene currently loaded |
UnityEngine.SceneManagement.LoadSceneMode | sceneMode | The type of loading |
OnSceneUnloaded(Scene)
Gets invoked whenever a scene is unloaded
Declaration
void OnSceneUnloaded(Scene scene)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.SceneManagement.Scene | scene | The unloaded scene |