Chunk ID Seemingly not accounting for Priority?

We have two different asset rules referencing the same primary data asset, one is set with a priority of 0 and a chunk ID of 0, the other has a priority of 1000 and a chunk ID of 101.

Regardless of the priorities, the first one always seems to control the chunk ID of the asset. Only setting it’s chunk id to -1 does it seem to let the latter actually impart control.

We have a Primary Data Asset which is in the Asset Manager’s “primary asset types to scan”

We also have a UPrimaryAssetLabel (in a location picked up by the “primary asset types to scan” for PrimaryAssetLabels)

They are both referencing the same file.

One is set with a priority of 0 and a chunk ID of 0, the other has a priority of 1000 and a chunk ID of 101.

Using the asset audit tool (making sure to close it an reopen after every adjustment) I can see that no matter the priority settings of them both, the entry in the .ini takes control. Only when the .ini is set to -1 as it’s ChunkID does the asset label actually have any control.

But I guess my general question is, is this expected or is something going wrong somewhere?

The reference viewer shows that only these two things are referencing the asset in question, and changing the ChunkID of the .ini does allow it to switch between them. However I would have thought that the .ini with a low priority would serve as the default for assets of this type and the more specific PrimaryAssetLabel with the higher priority would control it.

Hi!

Each Primary Asset is expected to have only one Primary Asset Rule; this is probably why only the first one is getting assigned. The Priority property is not used for conflict resolution if the Primary Asset has two rules set for it; instead, it applies to the referenced assets, also known as “Secondary Assets”. If two Primary Assets reference the same Secondary Asset, then the Secondary Asset will follow the rules of the Primary Asset referencing it with the higher priority.

As per the FPrimaryAssetRules.Priority property’s comment:

/** Primary Assets with a higher priority will take precedence over lower priorities when assigning management for referenced assets. If priorities match, both will manage the same Secondary Asset. */You should either set the Primary Asset rules via the AssetManager’s “primary asset types to scan” property, or via UPrimaryAssetLabel, but not both.

If you need more control over the rules of your Primary Assets, we recommend overriding the AssetManager class. That class is highly extendible; almost every single function in it is virtual. We generally expect bigger games to override that class. Then you don’t need to use “primary asset types to scan” nor UPrimaryAssetLabel, you can programmatically set your own rules. Or, in your case, you can extend it to support your use case; having a generic “primary asset types to scan” rule, which can then be overridden by a UPrimaryAssetLabel.