Skip to main content

Overview

The EbxAssetEntry class represents entity assets in the Frostbite engine. EBX assets are the primary data format for game entities, containing blueprints, levels, and gameplay data.

Class Definition

public class EbxAssetEntry : AssetEntry
{
    public Guid Guid;
    public List<Guid> DependentAssets;
    public override string AssetType => "ebx";
}
Location: FrostySdk/Managers/AssetManager.cs:353

Properties

Guid
Guid
Unique identifier for the EBX asset. Used for cross-referencing and dependency tracking.
DependentAssets
List<Guid>
List of asset GUIDs that this EBX asset depends on. Represents import references.
AssetType
string
Returns "ebx" to identify this as an entity asset entry.

Inherited Properties

Methods

ContainsDependency

public bool ContainsDependency(Guid guid)
Checks if this EBX asset depends on another asset.
guid
Guid
required
GUID of the asset to check for dependency
return
bool
True if the specified GUID is in the dependency list

EnumerateDependencies

public IEnumerable<Guid> EnumerateDependencies()
Iterates through all asset dependencies. Returns modified dependencies if the asset has been modified.
return
IEnumerable<Guid>
Enumerable collection of dependent asset GUIDs

Inherited Methods

Usage Examples

Reading an EBX Asset

EbxAssetEntry entry = assetManager.GetEbxEntry("characters/hero/mesh");
if (entry != null)
{
    Console.WriteLine($"Type: {entry.Type}");
    Console.WriteLine($"GUID: {entry.Guid}");
    Console.WriteLine($"Dependencies: {entry.DependentAssets.Count}");
}

Checking Dependencies

Guid targetGuid = /* ... */;
if (entry.ContainsDependency(targetGuid))
{
    Console.WriteLine("Asset depends on target");
}

// Enumerate all dependencies
foreach (Guid depGuid in entry.EnumerateDependencies())
{
    var depEntry = assetManager.GetEbxEntry(depGuid);
    Console.WriteLine($"Depends on: {depEntry?.Name}");
}

Linking Resources

EbxAssetEntry ebx = assetManager.GetEbxEntry("textures/ui/icon");
ResAssetEntry res = assetManager.GetResEntry("textures/ui/icon");

// Link the resource to the EBX
ebx.LinkAsset(res);

EBX-Specific Types

EBX assets use specialized reference types for linking:

PointerRef

References to other EBX objects (internal or external).
public struct PointerRef
{
    public EbxImportReference External;  // External asset reference
    public object Internal;              // Internal object reference
    public PointerRefType Type;          // Internal, External, or Null
}

ResourceRef

References to resource assets by resource ID.
public struct ResourceRef
{
    public ulong resourceId;  // Resource identifier
}

TypeRef

References to type definitions.
public class TypeRef
{
    public string Name;  // Type name
    public Guid Guid;    // Type GUID
}

FileRef

References to external files.
public struct FileRef
{
    public string fileName;  // File path
}

Build docs developers (and LLMs) love