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.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-178303 in the post.
|Component||UE - Foundation - Core - Cooker|
|Affects Versions||5.3, 4.23|
|Created||Feb 23, 2023|
|Updated||Feb 24, 2023|