How can i cook a single uasset

my english is really bad. forgive me…

i’m already pak a uasset success. but it can’t be used in my pakage Gmae. i have been debug the game and check the output log. the log tell me : the asset must be cook before the game use it. then i try to cook a uasset before i pak it, but the cooking command just cook a uproject, so i want to know how to cook a single uasset.

It is not possible to cook single uasset. You should cook the whole project. However, Unreal is very smart with this and it and it will not re-cook everything, but only changed files.

thank you very much. im already finished it.

Cooking a single asset in C++ is essentially calling SavePackagewith a specific cook context. To build this pipeline, you need to:

  1. Call BeginCacheForCookedPlatformData on the asset for your target platform.

  2. Wait for all asynchronous shader compilations and UE5 AssetCompile tasks to finish.

  3. Call SavePackage using the correct PackageWriter, depending on whether your project uses traditional .pak files or IoStore.

If you don’t want to write and maintain this boilerplate C++ just to update a live game, I developed a plugin called Runtime Details that handles this exact low-level process under the hood.

Our Asset Hot Update feature automatically runs this cook pipeline for the specific asset you select and pushes it directly to your running Packaged Build over the network.