AssemblyInfo.cs to define plugin metadata and register extensions.
Metadata Attributes
These attributes define basic plugin information displayed in the Frosty UI.PluginDisplayNameAttribute
Sets the display name shown in the plugin manager. From~/workspace/source/FrostyPlugin/Attributes/PluginDisplayNameAttribute.cs:9:
PluginAuthorAttribute
Specifies the plugin author. From~/workspace/source/FrostyPlugin/Attributes/PluginAuthorAttribute.cs:9:
PluginVersionAttribute
Defines the plugin version. From~/workspace/source/FrostyPlugin/Attributes/PluginVersionAttribute.cs:9:
Profile Validation Attributes
Control which game profiles load the plugin.PluginValidForProfileAttribute
Restricts the plugin to specific game profiles. Can be applied multiple times. From~/workspace/source/FrostyPlugin/Attributes/PluginValidForProfileAttribute.cs:9:
PluginNotValidForProfileAttribute
Excludes the plugin from specific game profiles. From~/workspace/source/FrostyPlugin/Attributes/PluginNotValidForProfileAttribute.cs:9:
Without profile attributes, plugins load for all game profiles by default.
Registration Attributes
These attributes register plugin extensions with the PluginManager.RegisterAssetDefinitionAttribute
Registers anAssetDefinition for a specific asset type.
From ~/workspace/source/FrostyPlugin/Attributes/RegisterAssetDefinitionAttribute.cs:9:
string
required
The asset type name from the game’s type library (e.g.,
"TextureAsset", "MeshAsset")Type
required
The class type that inherits from
AssetDefinitionRegisterMenuExtensionAttribute
Registers a custom menu item. From~/workspace/source/FrostyPlugin/Attributes/RegisterMenuExtensionAttribute.cs:9:
Type
required
Class that inherits from
MenuExtensionPluginManagerType
default:"Editor"
Where to show the menu:
Editor, ModManager, or BothRegisterDataExplorerContextMenuAttribute
Registers a context menu item for the Data Explorer. From~/workspace/source/FrostyPlugin/Attributes/RegisterDataExplorerContextMenuAttribute.cs:11:
Type
required
Class that inherits from
DataExplorerContextMenuExtensionRegisterCustomHandlerAttribute
Registers a custom handler for specific asset or resource types. From~/workspace/source/FrostyPlugin/Attributes/RegisterCustomHandlerAttribute.cs:12:
CustomHandlerType
required
CustomHandlerType.Ebx or CustomHandlerType.ResType
required
Handler class implementing
ICustomActionHandlerResourceType
Resource type for
Res handlersstring
EBX asset type name for
Ebx handlersRegisterExecutionAction
Registers an action to run during mod execution (Mod Manager only). From~/workspace/source/FrostyPlugin/Attributes/RegisterExecutionAction.cs:7:
Type
required
Class that inherits from
ExecutionActionRegisterTabExtensionAttribute
Registers a custom tab in the editor. From~/workspace/source/FrostyPlugin/Attributes/RegisterTabExtensionAttribute.cs:10:
Type
required
Class that inherits from
TabExtensionRegisterGlobalTypeEditorAttribute
Registers a custom editor for a specific type, used globally across all property grids.string
required
The type name to match
Type
required
Custom editor control type
RegisterTypeOverrideAttribute
Overrides the default type handling with a custom class.RegisterStartupActionAttribute
Registers an action that runs when Frosty starts, before profile loading. From~/workspace/source/FrostyPlugin/Attributes/RegisterStartupActionAttribute.cs:6:
RegisterOptionsExtensionAttribute
Registers an options page in the settings dialog.RegisterProfileAttribute
Registers a custom game profile.RegisterThirdPartyDllAttribute
Marks a DLL as a third-party dependency that shouldn’t be treated as a plugin.RegisterLocalizedStringDatabaseAttribute
Registers a custom localized string database implementation. From~/workspace/source/FrostyPlugin/Attributes/RegisterLocalizedStringDatabaseAttribute.cs:9:
Type
required
Class that implements
ILocalizedStringDatabase interfaceRegisterShaderAttribute
Registers a custom vertex, pixel, or compute shader for use in the editor viewport. From~/workspace/source/FrostyPlugin/Attributes/RegisterShaderAttribute.cs:28:
ShaderType
required
Type of shader:
VertexShader, PixelShader, or ComputeShaderstring
required
Key name to retrieve the shader from
FrostyShaderDbstring
required
Embedded resource name in
Namespace.ResourceName formatRegisterUserShaderAttribute
Registers a user-editable shader with XML descriptor. From~/workspace/source/FrostyPlugin/Attributes/RegisterUserShaderAttribute.cs:3:
string
required
Name of the shader
string
required
Path to XML descriptor file
RegisterCustomAssetManagerAttribute
Registers a custom asset manager for handling specific asset types. From~/workspace/source/FrostyPlugin/Attributes/RegisterCustomAssetManagerAttribute.cs:10:
string
required
Asset manager type identifier
Type
required
Class that implements
ICustomAssetManager interfaceComplete Example
Here’s a completeAssemblyInfo.cs from the MeshSetPlugin:
Attribute Load Phases
Startup Phase
Loaded before profile selection:RegisterProfileAttributeRegisterTypeOverrideAttributeRegisterGlobalTypeEditorAttributeRegisterStartupActionAttribute
Initialize Phase
Loaded after profile is selected:RegisterAssetDefinitionAttributeRegisterMenuExtensionAttributeRegisterOptionsExtensionAttributeRegisterThirdPartyDllAttributeRegisterLocalizedStringDatabaseAttributeRegisterShaderAttributeRegisterTabExtensionAttributeRegisterDataExplorerContextMenuAttributeRegisterExecutionActionRegisterCustomHandlerAttribute
~/workspace/source/FrostyPlugin/PluginManager.cs:419 for the implementation.
Best Practices
Correct: Multiple Attributes
Correct: Multiple Attributes
Naming Conventions
Naming Conventions
- Use descriptive display names
- Version using semantic versioning (major.minor.patch.build)
- Match asset type names exactly as they appear in the game’s type library
Profile Validation
Profile Validation
Only use profile validation when necessary:
- Game-specific features that won’t work in other games
- Features that conflict with other games’ implementations
- Otherwise, let plugins work universally