Preparing Assets for Chunking

How to divide assets into chunks and cook them into .pak files

Choose your operating system:

Windows

macOS

Linux

Unreal Engine (UE) can deliver assets outside of the main executable of your applications in the form of .pak files. To do this, you need to organize your assets into chunks, groups of asset files that are recognized by the cooking process. This how-to will teach you how to organize assets into chunks from within Unreal Editor. When you have finished, you will have a sample project that will produce .pak files you can deliver with a patching system.

Recommended Assets

For this guide, you will be using the assets for the characters Crunch, Boris, and Khaimera from Paragon, which you can download from the Unreal Marketplace for free. As long as you have assets that you can safely group into separate folders, you do not need to use these specific assets. The Paragon character assets make a convenient test case since UE already organizes them this way.

ParagonAssets.png

Required Setup

Projects do not generate chunks during cooking or packaging by default. To set your project up for chunking, open your Project Settings and navigate to Project > Packaging , then make sure that Use Pak File and Generate Chunks are both enabled.

PackagingSettings.png

Organizing Your Chunking Scheme

Now that you have enabled chunking and set up your plugins, you need to organize your assets and package them into chunks.

For more information about the chunking process, refer to Cooking and Chunking.

  1. Inside the ParagonBoris folder, right-click , navigate to Create Advanced Asset > Miscellaneous , then create a new Data Asset .

    CreateDataAsset.png

  2. Choose Primary Asset Label as the base class for the new data asset.

    AssetLabelType.png

    You can create subclasses of PrimaryAssetLabel in C++ to add extra metadata. If you create subclasses for PrimaryAssetLabel in Blueprint, they will not work for chunking purposes.

  3. Name the new Primary Asset Label Label_Boris .

    LabelBorisAsset.png

  4. Open Label_Boris and fill in the following properties:

    LabelBorisSettings.png

    Property

    Value

    Chunk ID

    This should be a unique value for each folder. Here we use 1001 for Boris.

    Priority

    This should be a value greater than 0. Here we set them all to 1 .

    Cook Rule

    Set to Always Cook .

    Label Assets in My Directory

    Set to Enabled .

  5. Repeat steps 1 through 4 for ParagonCrunch and ParagonKhaimera . In this example we set the ChunkID to 1002 for Crunch and 1003 for Khaimera.

  6. Package or cook content for your project.

Final Result

If everything is set up correctly, you will see the .pak files in your build directory, under /WindowsNoEditor/PatchingDemo/Content/Paks when UE has finished packaging them. UE will name each of them for the Chunk ID that you designated, and they each will contain the assets for our three characters.

FinalPakFiles.png

You can also navigate click Window > Asset Audit to view your chunks in the Asset Audit Window. You can find more information about Asset Audit in Cooking and Chunking.

PakFileAssetAudit.png

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss