RealDocs

UAssetManager::CreatePrimaryAssetIdFromChunkId

function Engine Since unknown
#include "Engine/AssetManager.h"
Access: public Specifiers: static

Description

Wraps a chunk index into a PrimaryAssetId of PackageChunkType, a virtual type that never loads data off disk. Used to track chunk installation state through the same API as regular primary assets.

Caveats & Gotchas

  • The resulting PrimaryAssetId is virtual — PackageChunkType assets are never loaded off disk, they only exist to represent chunk state through the primary asset APIs.
  • Chunk ids are platform- and cook-dependent; don't assume a given ChunkId is stable across different cook configurations.

Signature

static FPrimaryAssetId CreatePrimaryAssetIdFromChunkId(int32 ChunkId);

Parameters

Name Type Description Default
ChunkId int32 Chunk index to wrap into a PrimaryAssetId.

Return Type

FPrimaryAssetId

Example

Tracking a chunk as a primary asset id C++
FPrimaryAssetId ChunkAssetId = UAssetManager::CreatePrimaryAssetIdFromChunkId(3);
TSharedPtr<FStreamableHandle> Handle = UAssetManager::Get().GetPrimaryAssetHandle(ChunkAssetId);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.