Search Results for

    Show / Hide Table of Contents

    Class PluginManager

    The manager class for all plugins.

    Inheritance
    System.Object
    PluginManager
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.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
    System.Collections.Generic.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
    System.Collections.Generic.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
    System.Collections.Generic.IEnumerable<PluginMetadata>

    a collection of all enabled plugins

    | Improve this Doc View Source

    IgnoredPlugins

    Gets a read-only dictionary of an ignored plugin to the reason it was ignored, as an IgnoreReason.

    Declaration
    public static IReadOnlyDictionary<PluginMetadata, IgnoreReason> IgnoredPlugins { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<PluginMetadata, IgnoreReason>

    a dictionary of PluginMetadata to IgnoreReason of ignored plugins

    | Improve this Doc View Source

    Plugins

    An System.Collections.Generic.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
    System.Collections.Generic.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
    System.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 id)
    Parameters
    Type Name Description
    System.String id

    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
    System.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 id)
    Parameters
    Type Name Description
    System.String id

    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
    System.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
    System.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

    OnAnyPluginsStateChanged

    Called whenever any plugins, regardless of whether or not their change occurs during runtime, have their state changed.

    Declaration
    public static event PluginManager.OnAnyPluginsStateChangedDelegate OnAnyPluginsStateChanged
    Event Type
    Type Description
    PluginManager.OnAnyPluginsStateChangedDelegate
    Remarks

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

    | Improve this Doc View Source

    OnPluginsStateChanged

    Called whenever any plugins have their state changed at runtime with the System.Threading.Tasks.Task representing that state change.

    Declaration
    public static event Action<Task> OnPluginsStateChanged
    Event Type
    Type Description
    System.Action<System.Threading.Tasks.Task>
    Remarks

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

    | Improve this Doc View Source

    PluginDisabled

    Called whenever a plugin is disabled, before the plugin in question is enabled.

    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, before the plugin in question is enabled.

    Declaration
    public static event PluginManager.PluginEnableDelegate PluginEnabled
    Event Type
    Type Description
    PluginManager.PluginEnableDelegate
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX