UAssetManager::ChangeBundleStateForPrimaryAssets is not following redirectors when building PathsToLoad

Hi Thomas,

I’ll first try to answer your questions in order, and then ask some clarifying questions of my own:

‘What is the expected way that redirects inside bundles are meant to be resolved? Is adding FixupRedirectedAssetPath correct?’

Redirects should be handled by the lower-level loading systems so using FixupRedirectedAssetPath at that point is not appropriate.

‘Why is this issue intermittent? What updates the redirection in a bundle? It seems like some machines had state where the redirector had been applied but others did not.’

I’m not sure about this, but it could be related to the order that objects/assets are loaded. It requires some further debugging and context.

‘This was a pain to debug, can you/we add some kind of debug to highlight this issue more clearly?’

We will have a look to see how we can improve the reporting. From the log you posted it looks like the warning is coming from StaticLoadObject (UObjectGlobals.cpp) so it looks like ResolveName2 is not redirecting correctly. Let us know if you uncover anything more so that we can see where it makes sense to add more logging/context.

‘Is there a cleaner way to resolve these redirects or is using UAssetRegistryHelpers::FixupRedirectedAssetPath correct?’

Redirection should be handled already by the lower level loading systems so you shouldn’t have to handle it.

‘You probably want to delete this? I noticed it while in the AssetManager.’

Thank you, it’s now deleted.

Some questions:

  • Are you experiencing the issue in an Editor or cooked build?
    • In a cooked build some of the redirect handling is disabled because the assumption is the cook process will re-save everything.
  • How is /Script/Atlas.InventoryComponent referenced?
    • For example is it referenced via a TSoftClassPtr?