Skip to main content

Overview

The PluginManager class is the core plugin manager responsible for loading and managing plugin extensions in Frosty Toolsuite. It discovers plugins from the Plugins/ directory, validates them, and provides access to various extension types.

Constructor

PluginManager

Initializes a new instance of the PluginManager with the specified logger and context.
ILogger
required
The logging interface the plugin manager should use
PluginManagerType
required
The context which this plugin should load for (Editor, ModManager, or Both)

Properties

ManagerType

Retrieves the enum defining which manager is being loaded (Editor, ModManager, or Both).

Plugins

An enumerable collection of all plugins that have been found in the Plugins directory.

LoadedPlugins

A collection of plugins that have been successfully loaded and validated for the current profile.
Retrieves menu extensions that have been loaded from plugins.

TabExtensions

Retrieves tab extensions that have been loaded from plugins.

DataExplorerContextMenuExtensions

Retrieves data explorer context menu item extensions loaded from plugins.

ExecutionActions

Retrieves execution actions that have been loaded from plugins for mod launching.

OptionsExtensions

Retrieves options extensions that have been loaded from plugins.

Profiles

Retrieves game profiles that have been loaded from plugins.

StartupActions

Retrieves startup actions that have been loaded from plugins.

Methods

Initialize

Initializes all post-profile assembly plugins. This method must be called after the game profile is loaded to initialize profile-specific plugins.

GetAssetDefinition

Returns the AssetDefinition for the specified asset type.
string
required
The type of the asset definition to obtain (case-insensitive)
AssetDefinition
The AssetDefinition for the specified type, or null if not found

GetTypeEditor

Returns the Type to use to construct the property grid type editor with the specified lookup name.
string
required
The lookup name of the type editor to obtain (case-insensitive)
Type
The Type of the type editor, or null if not found

GetTypeOverride

Returns the Type of the type override class with the specified lookup name.
string
required
The lookup name of the type override to obtain (case-insensitive)
Type
The Type of the type override, or null if not found

GetCustomHandler

Returns a custom action handler for the specified EBX type, handler hash, or resource type.
string
The EBX type name to get a handler for
uint
The FNV1 hash of the EBX type
ResourceType
The resource type to get a handler for
ICustomActionHandler
A new instance of the custom handler, or null if not found

GetPluginAssembly

Returns the Assembly of the specified plugin if it is loaded.
string
required
The name of the plugin to obtain
Assembly
The Assembly of the plugin, or null if not found

GetLocalizedStringDatabase

Creates and returns the localized string database, or a default one if none was specified by any loaded plugin.
ILocalizedStringDatabase
The constructed localized string database instance

GetShader

Returns the shader bytecode of the shader specified by the name and shader type.
ShaderType
required
The type of shader (VertexShader, PixelShader, or ComputeShader)
string
required
The resource name of the shader
byte[]
The bytecode of the shader, or null if not found

GetUserShaders

Returns an enumerable collection of user-defined shader names.
IEnumerable<string>
Collection of user shader descriptors

IsThirdPartyDll

Returns true if a plugin has registered the specified name as a third-party DLL.
string
required
The name of the DLL to check (case-insensitive)
bool
True if the DLL is registered as third-party

IsManagerType

Returns true if the loaded manager matches the specified manager type.
PluginManagerType
required
The manager type to check (Editor, ModManager, or Both)
bool
True if the manager type matches

LoadPlugin

Attempts to load a plugin located at the specified path.
string
required
The path to the target plugin DLL
PluginLoadType?
Optional. Determines what should be loaded from the plugin (Startup or Initialize)
Plugin
A Plugin instance. Check the Status property for load success/failure

Enumerations

PluginManagerType

Defines the context in which the plugin manager operates.

PluginLoadType

Defines when a plugin should be loaded:
  • Startup: Loaded before profile initialization (profiles, type overrides, global editors)
  • Initialize: Loaded after profile initialization (asset definitions, menu extensions, handlers)

PluginLoadStatus

Indicates the load status of a plugin.

See Also