Game.ini:[/Script/Engine/AssetManagerSettings]:PrimaryAssetTypes is an ini setting to specify which PrimaryAssets should be used by the engine during cook to specify which packages gets cooked and which chunks they go into.

That field is marked with a map uniqueness entry on PrimaryAssetType:


It is unique because the editor's implementation of this field maps from PrimaryAssetType to the given data, so having more than one entry for a PrimaryAssetType would clobber all but the last entry and would probably cause unexpected errors for the ini author.

But the struct written by PrimaryAssetTypesToScan has a field - Directories - that would be useful to be extendable from plugins, so a licensee could add their plugin directories to the search directories for a given type.

Change the ini settings and parsing to allow some mechanism for plugins to add directories.

Idea 1) Remove the uniqueness marker, make PrimaryAssetTypesToScan an array that allows duplicates as far as the ini parser is concerned, and do the merging of duplicate entries in the array using custom code in AssetManager.cpp that allows extending Directory list but gives an error on any other changes.

Idea 2) Add a separate ini field PrimaryAssetDirectories=(PrimaryAssetType="<TypeName>", Directories=((Path="<PathName>")))
that is read separately after parsing PrimaryAssetTypesToScan and adds the directories on.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-178303 in the post.

Login to Vote

ComponentUE - Foundation - Core - Cooker
Affects Versions4.235.3
Target Fix5.5
CreatedFeb 23, 2023
UpdatedFeb 29, 2024
View Jira Issue