Skip to main content

Overview

The AssetManager class provides comprehensive functionality for enumerating, loading, and modifying game assets including EBX, resources, and chunks.

Constructor

constructor
Creates a new AssetManager instance
FileSystem
required
Initialized FileSystem instance
ResourceManager
required
Initialized ResourceManager instance

Initialization

void
Initializes the asset manager and loads all asset metadata
bool
default:"true"
Perform additional initialization like EBX indexing
AssetManagerImportResult
default:"null"
Optional result object for tracking patch changes

Asset Retrieval

EBX Assets

EbxAssetEntry
Gets an EBX asset entry by name or GUID
string
Asset path (case-insensitive)
Guid
Asset GUID
EbxAsset
Loads and deserializes an EBX asset
EbxAssetEntry
Asset entry to load
bool
default:"false"
If true, returns original data ignoring modifications
T where T : EbxAsset
Loads an EBX asset as a specific type

Resource Assets

ResAssetEntry
Gets a resource entry by name or resource ID
string
Resource name
ulong
Resource runtime ID
Stream
Gets the raw resource data stream
T where T : Resource
Loads and deserializes a resource as a specific type
ResAssetEntry
required
Resource entry to load
ModifiedResource
default:"null"
Optional modified resource data

Chunk Assets

ChunkAssetEntry
Gets a chunk entry by its GUID
Stream
Gets the raw chunk data stream

Asset Enumeration

Enumerate EBX

IEnumerable<EbxAssetEntry>
Enumerates EBX assets with optional filtering
string
default:""
Filter by asset type (supports inheritance)
bool
default:"false"
Only return modified assets
bool
default:"false"
Include indirectly modified linked assets
string
default:""
Filter by bundle path

Enumerate Resources

IEnumerable<ResAssetEntry>
Enumerates resource assets
uint
default:"0"
Filter by ResourceType (0 = all types)
bool
default:"false"
Only return modified resources

Enumerate Chunks

IEnumerable<ChunkAssetEntry>
Enumerates chunk assets
bool
default:"false"
Only return modified chunks

Enumerate Bundles

IEnumerable<BundleEntry>
Enumerates bundle entries
BundleType
default:"BundleType.None"
Filter by bundle type
bool
default:"false"
Only return modified bundles

Asset Modification

Modify EBX

void
Marks an EBX asset as modified with new data
string
required
Asset name
EbxAsset
required
Modified asset object

Modify Resource

void
Marks a resource as modified
ulong
Resource runtime ID
string
Resource name
byte[]
Raw resource data
byte[]
default:"null"
Resource metadata
Resource
Resource object

Modify Chunk

bool
Modifies a chunk’s data
Guid
required
Chunk GUID
byte[]
required
New chunk data
Texture
default:"null"
Texture metadata for texture chunks

Adding Assets

Add EBX

EbxAssetEntry
Adds a new EBX asset to the manager
string
required
Asset name/path
EbxAsset
required
Asset object
params int[]
Bundle IDs to add asset to

Add Resource

ResAssetEntry
Adds a new resource to the manager
string
required
Resource name
ResourceType
required
Resource type
byte[]
required
Resource metadata
byte[]
required
Resource data
params int[]
Bundle IDs

Add Chunk

Guid
Adds a new chunk and returns its GUID
byte[]
required
Chunk data
Guid?
default:"null"
Optional specific GUID to use
Texture
default:"null"
Texture metadata for texture chunks
params int[]
Bundle IDs

Asset Management

Revert Asset

void
Reverts modifications to an asset
AssetEntry
required
Asset entry to revert
bool
default:"false"
Only revert data, not bundle assignments
bool
default:"true"
Suppress modification event

Reset All

void
Reverts all modifications across all assets

Get Counts

uint
Gets the total number of modified assets
uint
Gets count of EBX assets

Usage Example

See Also