Show / Hide Table of Contents

# Interface IDisablablePlugin

Provides methods to allow runtime disabling of a plugin.

##### Inherited Members

IPlugin.OnEnable()
IPlugin.OnApplicationQuit()
IPlugin.OnSceneLoaded(Scene, LoadSceneMode)
IPlugin.OnSceneUnloaded(Scene)
IPlugin.OnActiveSceneChanged(Scene, Scene)

###### Namespace: IPA

###### Assembly: IPA.Loader.dll

##### Syntax

    [Obsolete("Use the attribute-based system instead.")]
    public interface IDisablablePlugin : IPlugin

### Methods

| Improve this Doc View Source

#### OnDisable()

Called when a plugin is disabled at runtime. This should disable things like Harmony patches and unsubscribe from events. After this is called there should be no lingering effects of the mod.

##### Declaration

    void OnDisable()

##### Remarks

This will get called at shutdown, after OnApplicationQuit(), as well as when the plugin is disabled at runtime.

### Extension Methods

ReflectionUtil.SetField(Object, String, Object)
ReflectionUtil.SetField<T>(T, String, Object)
ReflectionUtil.GetField<T>(Object, String)
ReflectionUtil.SetProperty(Object, String, Object)
ReflectionUtil.SetProperty<T>(T, String, Object)
ReflectionUtil.InvokeMethod(Object, String, Object[])
ReflectionUtil.InvokeMethod<T>(T, String, Object[])
ReflectionUtil.InvokeMethod<T>(Object, String, Object[])
ReflectionUtil.InvokeMethod<T, U>(U, String, Object[])