I know that unreal doesn’t support this feature right now but it would be great if you can point me to a place to start. I only need this to work for uobject/aactor derived blueprints.
Cooking a single asset in C++ is essentially calling SavePackage with a specific cook context. To build this custom pipeline, you need to:
-
Call
BeginCacheForCookedPlatformDataon the asset for your target platform. -
Wait for all asynchronous shader compilations and UE5
AssetCompiletasks to finish. -
Call
SavePackageusing the correctPackageWriterto serialize the cooked data. -
Finally, invoke
UnrealPakto compress and package those saved files into an actual.pakorIoStore(.utoc/.ucas) container so the engine can mount it at runtime.
If you don’t want to build and maintain this boilerplate C++ pipeline 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 full cook pipeline for the specific asset you select, packages it, and pushes it directly to your running Packaged Build over the network.