Show / Hide Table of Contents

# Class PluginManager

The manager class for all plugins.

##### Inheritance

Object
PluginManager

##### Inherited Members

Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

###### Namespace: IPA.Loader

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

##### Syntax

    public static class PluginManager

### Properties

| Improve this Doc View Source

#### AllPlugins

Gets a list of all enabled BSIPA plugins. Use EnabledPlugins instead of this.

##### Declaration

    [Obsolete("This is an old name that no longer accurately represents its value. Use EnabledPlugins instead.")]
    public static IEnumerable<PluginMetadata> AllPlugins { get; }

##### Property Value

Type | Description
--- | ---
IEnumerable<PluginMetadata> | a collection of all enabled plugins as PluginMetadatas

| Improve this Doc View Source

#### DisabledPlugins

Gets a list of disabled BSIPA plugins.

##### Declaration

    public static IEnumerable<PluginMetadata> DisabledPlugins { get; }

##### Property Value

Type | Description
--- | ---
IEnumerable<PluginMetadata> | a collection of all disabled plugins as PluginMetadata

| Improve this Doc View Source

#### EnabledPlugins

Gets a collection of all enabled plugins, as represented by PluginMetadata.

##### Declaration

    public static IEnumerable<PluginMetadata> EnabledPlugins { get; }

##### Property Value

Type | Description
--- | ---
IEnumerable<PluginMetadata> | a collection of all enabled plugins

| Improve this Doc View Source

#### Plugins

An IEnumerable<T> of old IPA plugins.

##### Declaration

    [Obsolete("This exists only to provide support for legacy IPA plugins based on the IPlugin interface.")]
    public static IEnumerable<IPlugin> Plugins { get; }

##### Property Value

Type | Description
--- | ---
IEnumerable<IPlugin> | all legacy plugin instances

### Methods

| Improve this Doc View Source

#### GetDisabledPlugin(String)

Gets a disabled plugin's metadata by its name.

##### Declaration

    public static PluginMetadata GetDisabledPlugin(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
String | name | the name of the disabled plugin to get

##### Returns

Type | Description
--- | ---
PluginMetadata | the metadata for the corresponding plugin

| Improve this Doc View Source

#### GetDisabledPluginFromId(String)

Gets a disabled plugin's metadata by its ID.

##### Declaration

    public static PluginMetadata GetDisabledPluginFromId(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
String | name | the ID of the disabled plugin to get

##### Returns

Type | Description
--- | ---
PluginMetadata | the metadata for the corresponding plugin

| Improve this Doc View Source

#### GetPlugin(String)

Gets info about the enabled plugin with the specified name.

##### Declaration

    public static PluginMetadata GetPlugin(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
String | name | the name of the plugin to get (must be an exact match)

##### Returns

Type | Description
--- | ---
PluginMetadata | the plugin metadata for the requested plugin or null if it doesn't exist or is disabled

| Improve this Doc View Source

#### GetPluginFromId(String)

Gets info about the enabled plugin with the specified ID.

##### Declaration

    public static PluginMetadata GetPluginFromId(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
String | name | the ID name of the plugin to get (must be an exact match)

##### Returns

Type | Description
--- | ---
PluginMetadata | the plugin metadata for the requested plugin or null if it doesn't exist or is disabled

| Improve this Doc View Source

#### IsDisabled(PluginMetadata)

Checks if a given plugin is disabled.

##### Declaration

    public static bool IsDisabled(PluginMetadata meta)

##### Parameters

Type | Name | Description
--- | --- | ---
PluginMetadata | meta | the plugin to check

##### Returns

Type | Description
--- | ---
Boolean | true if the plugin is disabled, false otherwise.

| Improve this Doc View Source

#### IsEnabled(PluginMetadata)

Checks if a given plugin is enabled.

##### Declaration

    public static bool IsEnabled(PluginMetadata meta)

##### Parameters

Type | Name | Description
--- | --- | ---
PluginMetadata | meta | the plugin to check

##### Returns

Type | Description
--- | ---
Boolean | true if the plugin is enabled, false otherwise.

| Improve this Doc View Source

#### PluginStateTransaction()

Creates a new transaction for mod enabling and disabling mods simultaneously.

##### Declaration

    public static StateTransitionTransaction PluginStateTransaction()

##### Returns

Type | Description
--- | ---
StateTransitionTransaction | a new StateTransitionTransaction that captures the current state of loaded mods

### Events

| Improve this Doc View Source

#### OnPluginsStateChanged

Called whenever any plugins have their state changed with the Task representing that state change.

##### Declaration

    public static event Action<Task> OnPluginsStateChanged

##### Event Type

Type | Description
--- | ---
Action<Task> |

##### Remarks

Note that this is called on the Unity main thread, and cannot therefore block, as the Task provided represents operations that also run on the Unity main thread.

| Improve this Doc View Source

#### PluginDisabled

Called whenever a plugin is disabled.

##### Declaration

    public static event PluginManager.PluginDisableDelegate PluginDisabled

##### Event Type

Type | Description
--- | ---
PluginManager.PluginDisableDelegate |

| Improve this Doc View Source

#### PluginEnabled

Called whenever a plugin is enabled.

##### Declaration

    public static event PluginManager.PluginEnableDelegate PluginEnabled

##### Event Type

Type | Description
--- | ---
PluginManager.PluginEnableDelegate |