Asset Registry: Why does this assert only in Standalone from Editor?

    // Doesn't work in standalone?
    FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");
    TArray<FAssetData> AssetData;
    AssetRegistryModule.Get().GetAssetsByClass(TEXT("ECGame_MapSummary"), AssetData, false);
    ASSERTV(AssetData.Num() > 0, TEXT("No Map Summaries Found"));

Simple question really, I can’t understand why the above code only fires the assertion in Standalone, and only then when launched from the Editor?

If I package the game and launch, it works fine (in any configuration)
If I use PIE, it works fine.

Only in Standalone does it crash - and I don’t get why. I’ve tried called AssetRegistry.IsLoadingAssets() which returns false - so what gives?

Essentially I’m trying to find any ECGame_MapSummary assets that I’ve created from ANYWHERE in the project. I don’t want to have a list of defined objects because I want modders to be able to create these as well and add them to the list without conflicts.

Can you explain a bit more in detail, how your MapSummary-System works? For our game we use a similar approach like UT where you extend WorldSettings, give it a new Member that holds Summary-Info and at runtime extract that Summary-Object from the map. We just request the Maps(World-Class). As we use the AssetRegistry aswell., maybe i can reproduce it or find a problem.


Mine’s a bit different to UT, I just created a UObject class and create one of them as an asset in the content browser for each map I want summary data for.

I like UT’s method and I can see why they did it that way (more obvious for third-party map makers etc.), but I had issues with trying to delete maps etc. in UT before so I rolled my own system. Also means that I don’t need all that summary data like big UI images etc. loaded during a match.

Weirdly, I’ve since managed to get around this by adding the assets as ‘Primary Asset Types’ in the Asset Manager section in project settings - but I honestly have no idea why that’s working, unless Asset Manager primes all those assets before asset registry or something. It won’t pick up third-party map summaries included as plugins / other modules either.

Okay that is strange :confused:

Just had this, since i changed our system to this system.
Make sure you add this type to it for cooking. Then cook and try again.