UAssetManager::GetPakStringToChunkIdMapping
#include "Engine/AssetManager.h"
Access: public
Description
Helper to get the chunk id based on the string override for a pak chunk, the inverse of GetPakChunkIdToStringMapping.
Caveats & Gotchas
- • Internally calls GetPakChunkIdToStringMapping and inverts the result, so it only returns useful data if your UAssetManager subclass overrides that function.
- • If multiple chunk ids map to the same override string, only one survives in the resulting map since duplicate keys are silently overwritten.
Signature
void GetPakStringToChunkIdMapping(TMap<FString, int32>& StringOverrideToChunkId) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| StringOverrideToChunkId | TMap<FString, int32>& | Out parameter filled with the inverse mapping, string override name to chunk id. | — |
Return Type
void Example
Resolve a chunk id from an override string C++
TMap<FString, int32> StringToChunkId;
UAssetManager::Get().GetPakStringToChunkIdMapping(StringToChunkId);
if (const int32* ChunkId = StringToChunkId.Find(TEXT("DLC1")))
{
UE_LOG(LogTemp, Log, TEXT("DLC1 maps to chunk %d"), *ChunkId);
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?