Overview
The Frosty.Core namespace provides the application-level framework for Frosty Editor. It exposes global instances of core managers and provides convenient access to editor state.
App Class
Central static class providing access to all core managers and editor state.
using Frosty . Core ;
// Access managers
AssetManager am = App . AssetManager ;
ResourceManager rm = App . ResourceManager ;
FileSystem fs = App . FileSystem ;
// Get current selection
EbxAssetEntry selectedAsset = App . SelectedAsset ;
string selectedProfile = App . SelectedProfile ;
Static Properties
Global AssetManager instance for accessing and modifying game assets EbxAssetEntry entry = App . AssetManager . GetEbxEntry ( "path/to/asset" );
Global ResourceManager instance for loading resource data Stream data = App . ResourceManager . GetResourceData ( sha1 );
Global FileSystem instance for path resolution and catalog access string path = App . FileSystem . ResolvePath ( "native_data/catalog/cas.cat" );
Manages loaded plugins and extensions
Currently selected asset in the editor if ( App . SelectedAsset != null )
{
Console . WriteLine ( $"Selected: { App . SelectedAsset . Name } " );
}
Name of the currently loaded game profile
Name of the currently selected pack
Global logger instance for diagnostic output App . Logger . Log ( "Processing asset: {0}" , assetName );
Set of bundle IDs that are whitelisted for processing
Path to profile-specific settings directory string settingsPath = App . ProfileSettingsPath ;
// Returns: C:\Users\Username\AppData\Local\Frosty\FIFA20
Path to global Frosty settings directory string globalPath = App . GlobalSettingsPath ;
// Returns: C:\Users\Username\AppData\Local\Frosty
Reference to the main editor window
Frosty application version number
Usage Examples
Access Managers
Load Resources
Settings Paths
Bundle Whitelisting
using Frosty . Core ;
// Get an EBX asset
EbxAssetEntry entry = App . AssetManager . GetEbxEntry ( "content/characters/player" );
if ( entry != null )
{
EbxAsset asset = App . AssetManager . GetEbx ( entry );
// Modify asset
// ...
// Save modification
App . AssetManager . ModifyEbx ( entry . Name , asset );
}
Plugin Integration
Plugins typically access managers through the App class:
public class MyEditorPlugin : IAssetDefinition
{
public void OnAssetOpened ()
{
// Access current asset
var asset = App . SelectedAsset ;
// Load asset data
var ebx = App . AssetManager . GetEbx ( asset );
// Log information
App . Logger . Log ( "Opened asset: {0}" , asset . Name );
}
}
See Also