Keep Your Assets in a Cooked Build
Goal: make sure every CrimsonCore asset you author ships in a packaged build, not just in the editor.
These types are reached through soft references and by-id lookups, which the cooker does not follow. CrimsonCore registers them with the Asset Manager as AlwaysCook, but it can only do that for folders you tell it about.
| Primary asset type | Authored as |
|---|---|
CrimsonPawnData | Data asset (UCrimsonPawnData) |
CrimsonNPCData | Data asset (UCrimsonNPCData) |
CrimsonCompanionData | Data asset (UCrimsonCompanionData) |
CrimsonEnemySpawnerData | Data asset (UCrimsonEnemySpawnerData) |
CrimsonAttributeMetadata | Data asset (UCrimsonAttributeMetadata) |
LootContext | Data asset (UCrimsonLootContextDefinition) |
1. Point the scan paths at your content
AlwaysCook ships everything of those types inside it. Point the paths at the folders holding your data assets rather than at a whole content root.Set PrimaryAssetScanPaths on UCrimsonCoreSettings to the folder (or folders) holding these assets. Sub-folders are included. Use the mount path the Content Browser's Copy Reference gives you for that folder.
Project Settings -> Crimson -> Crimson Core -> Asset Discovery -> PrimaryAssetScanPaths. Click +, then pick your folder with the directory picker.
LogCrimsonCore: CrimsonCore: registered N primary asset type(s) as AlwaysCook across M scan path(s). M must match the number of paths you added; a blank entry is skipped and never counted.2. Confirm the Asset Manager sees them
With the editor open, the registration log line names how many types were registered:
LogCrimsonCore: CrimsonCore: registered N primary asset type(s) as AlwaysCook across M scan path(s).
AssetManager.DumpAssetRegistryInfo in the editor console - each type you have authored assets for should report a non-zero count.3. Confirm they cooked
Package a Development build, then confirm the assets actually shipped:
- In
Saved/Cooked/<Platform>/<Project>/, look for each data asset. Assets you authored in your own content cook under your project's mount point; assets that live in a plugin'sContent/cook under that plugin's own mount point. - Open the newest cook log in
Saved/Logs/and confirm it reports no missing entry for any of them.
Anything of a type in the table above that is absent from the cooked output is still being dropped - re-check step 1, then re-cook.
See also
- System Layer - the Asset Manager and scan paths
- Concept: The Integration Layer