Hello,
In our project, we have several .pak files located within the project’s content folder, for example:
Packs/Expeditions/
Packs/Events/
Packs/Clans/
…
Each of these folders contains a PrimaryAssetLabel that is configured to include all contents of the folder into a .pak file. Each folder is assigned a unique ChunkID, so each one results in a separate .pak file.
Here are the settings for each PrimaryAssetLabel:
Priority: 1
ChunkID: (unique per folder)
ApplyRecursive: False
CookRule: Always Cook
Label Assets in My Directory: True
In Runtime Label: False
ExplicitAssets: {}
ExplicitBlueprints: {}
AssetCollection: None
We are using the standard Unreal Engine build system, with no custom packaging or asset cooking pipeline.
Previously, the resulting .pak files preserved the full relative paths (e.g., Packs/Expeditions/) for their contents. For example, an asset located at:
Packs/Expeditions/Test/1.uasset
would be extracted with the same path using UnrealPak -Extract.
However, now the .pak file omits the initial folders and starts directly with subfolders, such as:
Test/1.uasset
So the relative path Packs/Expeditions/ is missing.
We found that this behavior changes based on the following project settings:
Share Material Shader Code
Shared Material Native Libraries
When these are enabled, the .pak files contain full paths. When they are disabled, the paths become shorter and omit the top-level folders.
This affects how we locate assets inside the .pak files and causes issues during mounting or extraction.
Our Questions: How can we ensure that .pak files always contain the full relative paths (e.g., starting with Packs/Expeditions/)? Alternatively, is there a way to detect whether a .pak file contains full or shortened paths, so we can adjust the mount point accordingly during runtime? If so, how?
Thanks in advance for your help!