Skip to main content
Custom asset editors provide specialized UI for viewing and editing specific asset types. They inherit from FrostyAssetEditor and integrate with the Frosty Editor’s tab system.

FrostyAssetEditor Base Class

From ~/workspace/source/FrostyPlugin/Controls/FrostyAssetEditor.cs:32:

Creating a Basic Editor

1

Create Editor Class

Inherit from FrostyAssetEditor and pass the logger to the base constructor:
2

Define the UI Template

Create a WPF control template in your plugin’s XAML resource dictionary:
3

Register the Template

Override the static constructor to register your control template:
4

Load Asset Data

Override LoadAsset to perform custom loading:

Accessing Asset Data

Root Object Access

The RootObject property provides access to the main asset object:

Loading Dependencies

Dependencies are automatically loaded. Access them via the dependentObjects dictionary:

Adding New Dependencies

From ~/workspace/source/FrostyPlugin/Controls/FrostyAssetEditor.cs:106:

Modifying Assets

To mark an asset as modified, set the AssetModified property to true. This automatically saves changes: From ~/workspace/source/FrostyPlugin/Controls/FrostyAssetEditor.cs:64:

Example: Modifying Properties

Property Grid Integration

The FrostyPropertyGrid control provides automatic property editing. Name it PART_AssetPropertyGrid in your template:
The property grid automatically:
  • Displays all properties of the root object
  • Binds to AssetModified to save changes
  • Provides type-appropriate editors (text boxes, dropdowns, etc.)

Custom Toolbar Items

Add custom toolbar buttons to your editor:

Handling Resources

Loading Texture Resources

Loading MeshSet Resources

Complete Example

Here’s a simplified texture editor:

Cleanup

Override Closed() to release resources when the editor is closed:
Always clean up unmanaged resources (textures, 3D meshes, etc.) to prevent memory leaks.

Next Steps

Custom Actions

Add context menu actions and commands

Attributes Reference

Complete attribute reference