Loading Screen System (Level Transitions w/ Progress)

Hey, the problem with that plugin node is that you have to give a name. In an open world (composition) the persistent level is mostly empty and loads in no time but the problem are the lower levels and you dont really know which one is being streamed in when you teleport somewhere, so that function is rather useless. I was experimenting with a way to get the names of all levels in my directory tree and then then check all of them for a loading process, that way you would get any ongoing load, but it always returns -1 for me. Maybe it only works in a coked game for shipping, I think I read something like parallel streaming doesn’t work in development builds which makes developing and testing it extremely tricky. I post my code here, anybody feel free to use it as a starting point. It’s not ready to use since it depends on my own library functions but you get the idea. I assembled it from various locations here in the forum and github

static TArray<FAssetData> WorldMapAssetData;

void UBaseGameInstance::StoreWorldMapAssetData()
{
FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>(FName(“AssetRegistry”));
IAssetRegistry& AssetRegistry = AssetRegistryModule.Get();

// Need to do this if running in the editor with -game to make sure that the assets in the following path are available
TArray<FString> PathsToScan;
PathsToScan.Add(TEXT(“/Game/MikaboshiShared/World/MainWorld250”));
AssetRegistry.ScanPathsSynchronous(PathsToScan);

AssetRegistry.GetAssetsByPath(FName(“/Game/MikaboshiShared/World/MainWorld250”), WorldMapAssetData, true);

//
// for (auto & Element : WorldMapAssetData)
// {
// FString **** = Element.AssetName.ToString();
// ULoggerBP::LogTrace(FE_LOG_CHANNEL::GENERAL,****);
// }

// TArray<UObject*> MeshAssets;
// EngineUtils::FindOrLoadAssetsByPath(TEXT(“/Game/MikaboshiShared/World/MainWorld250”), WorldMapAssetData, EngineUtils::ATL_Regular);

}

int32 UBaseGameInstance::GetCurrentAsyncWorldLoadingPercentage()
{
int32 l_Actual_Value;
int32 l_Lowest_Value = INT_MAX;

for (auto & Element : WorldMapAssetData)
{
l_Actual_Value = GetAsyncLoadPercentage(Element.PackageName);
if ((l_Actual_Value > -1) && (l_Actual_Value < l_Lowest_Value))
l_Lowest_Value = l_Actual_Value;
}

if (l_Lowest_Value != INT_MAX)
{
Debug_Trace(FE_LOG_CHANNEL::GENERAL, “Load: %u”, l_Lowest_Value);
return l_Lowest_Value;
}else
return -1;

}