Class Chainloader
The manager and loader for all plugins, and the entry point for BepInEx plugin system.
Namespace: BepInEx.Bootstrap
Assembly: BepInEx.dll
Syntax
public static class Chainloader
Properties
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> |
The GameObject that all plugins are attached to as components.
Declaration
public static GameObject ManagerObject { get; }
Property Value
Type | Description |
---|---|
GameObject |
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> |
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
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 |
The entrypoint for the BepInEx plugin system.
Declaration
public static void Start()
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. |