Overview
TheChunkAssetEntry class represents chunk assets in the Frostbite engine. Chunks are binary data blocks used for large resources like texture mipmaps, mesh LODs, and streaming data.
Class Definition
FrostySdk/Managers/AssetManager.cs:394
Properties
Guid
Unique identifier for the chunk. Used as the chunk’s name.
uint
Size of the chunk data when stored in a bundle (may differ from actual size).
uint
Logical offset within the parent resource (for texture mips or mesh sections).
uint
Logical size of the chunk data after decompression.
uint
Start offset in the range of data covered by this chunk.
uint
End offset in the range of data covered by this chunk.
int
32-bit hash of the parent resource name (FNV-1 hash). Links chunk to its owner.
int
For texture chunks, indicates the first mipmap level. -1 if not applicable.
bool
True if this chunk is stored in a Table of Contents chunk bundle.
bool
Internal flag for special TOC chunk handling.
string
Returns the chunk GUID as a string (since chunks are identified by GUID).
string
Always returns
"Chunk".string
Returns
"chunk" to identify this as a chunk asset entry.Inherited Properties
See EbxAssetEntry for complete list of base properties including:- Sha1, Size, OriginalSize
- IsModified, IsDirty, IsAdded
- Bundles, LinkedAssets
- Location, IsInline
Methods
AddToBundle (Override)
int
required
Bundle index to add the chunk to
bool
True if successfully added. Returns false if chunk has no bundles and is not a new chunk.
Chunks cannot be added to bundles unless they already belong to at least one bundle or were explicitly created via
AddChunk().Inherited Methods
Chunk entries inherit methods fromAssetEntry:
AddToBundles(IEnumerable<int>)- Add to multiple bundlesIsInBundle(int bid)- Check bundle membershipEnumerateBundles(bool addedOnly)- Iterate bundlesLinkAsset(AssetEntry)- Link to parent assets
Usage Examples
Reading a Chunk
Loading Chunk Data
Modifying a Chunk
Creating a New Chunk
Creating a Texture Chunk
Linking Chunks to Resources
Finding Parent Resource
Enumerating Texture Mipmaps
Working with Modified Chunks
Checking Chunk Bundle Membership
Chunk Compression
Chunks are compressed based on the game profile:Modified Chunk Entry
When a chunk is modified, additional data is stored:Special Chunk Types
TOC Chunks
Table of Contents chunks store chunk bundles:Texture Chunks
Texture mipmaps are stored as chunks:Mesh Chunks
Mesh sections may be stored as chunks for streaming:Related Types
- EbxAssetEntry - Entity assets that may reference chunks
- ResAssetEntry - Resource assets that link to chunks
- AssetManager - Chunk management operations
- Texture - Texture resources using chunk mipmaps