Class Chainloader

The manager and loader for all plugins, and the entry point for BepInEx plugin system.

Inheritance
System.Object Chainloader
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: BepInEx.Bootstrap
Assembly: BepInEx.dll
Syntax
public static class Chainloader

Properties

DependencyErrors

Collection of error chainloader messages that occured during plugin loading. Contains information about what certain plugins were not loaded.

Declaration
public static List<string> DependencyErrors { get; }
Property Value
Type Description
System.Collections.Generic.List<System.String>

ManagerObject

The GameObject that all plugins are attached to as components.

Declaration
public static GameObject ManagerObject { get; }
Property Value
Type Description
UnityEngine.GameObject

PluginInfos

The loaded and initialized list of plugins.

Declaration
public static Dictionary<string, PluginInfo> PluginInfos { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, PluginInfo>

Plugins

List of all BepInPlugin loaded via the chainloader.

Declaration
[Obsolete("Use PluginInfos instead")]
public static List<BaseUnityPlugin> Plugins { get; }
Property Value
Type Description
System.Collections.Generic.List<BaseUnityPlugin>

Methods

Initialize(String, Boolean, ICollection<LogEventArgs>)

Initializes BepInEx to be able to start the chainloader.

Declaration
public static void Initialize(string gameExePath, bool startConsole = true, ICollection<LogEventArgs> preloaderLogEvents = null)
Parameters
Type Name Description
System.String gameExePath
System.Boolean startConsole
System.Collections.Generic.ICollection<LogEventArgs> preloaderLogEvents

Start()

The entrypoint for the BepInEx plugin system.

Declaration
public static void Start()

ToPluginInfo(TypeDefinition)

Analyzes the given type definition and attempts to convert it to a valid PluginInfo

Declaration
public static PluginInfo ToPluginInfo(TypeDefinition type)
Parameters
Type Name Description
TypeDefinition type

Type definition to analyze.

Returns
Type Description
PluginInfo

If the type represent a valid plugin, returns a PluginInfo instance. Otherwise, return null.