Loading Screen System (Level Transitions w/ Progress)

So for a game like a MOBA where all players load in together, and then after the match load back to the main menu will work? Thanks for your response.

I’ve noticed that this plugin seems to cause problems with nativiatizion and compiling.

I get errors that is is missing a directory: plugins/LoadingScreenSystem/Public
Tried adding it but still didn’t find it.

When you try to use native and it gets included it tends to give some type of error about unknown code.
This might also be some of the problem I am having with packaging wizard.
Have you had any other persons with this issue? Or know of a fix?

I will look into that. For reference, a few questions:

  • do you have the code plugin installed (available here) or does the “missing directory” error occur even without it? (clarification: the Blueprint system uses an optional code plugin for progress bars, linked above)

  • are there any issues when packaging without nativization?

  • what OS and UE4 version are you running?

Yes I have the plug-in in there to use the progress bars.
Using the current version ue. 4.21.2
windows 10
Packaging to Android_astc

It will package without it from the file menu.
Attempting to use package wizard results in a similar error.

Digging through errors I got something back on the LSS system a couple times.
But also it doesn’t always. Some times I get a plug-in valid()
Error.
And some times something about headers being wrong.

It might not exclusively be related to your product. Might have a header broken (which is very annoying since I use BP only except for ONE class that was removed)

One those nice things Google can’t help with and have spend time chasing.
I’ll try to get you a screen shot of the log in next hour or two

Here we go.


+UE4\Sync\Engine\Source\Developer\BlueprintNativeCodeGen\Private\BlueprintNativeCodeGenManifest.cpp] [Line: 223]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: Failed to identify the asset package that '/Game/Blueprints/LSS_LoadingScreenSystem/UI/Cogs/UI_LSS_Fade_Cogs_02' belongs to.
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: Stack:
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb57ffb134 UE4Editor-BlueprintNativeCodeGen.dll!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb58002626 UE4Editor-BlueprintNativeCodeGen.dll!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb57ffe4cd UE4Editor-BlueprintNativeCodeGen.dll!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb39fa29e4 UE4Editor-UnrealEd.dll!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb3a01d3e4 UE4Editor-UnrealEd.dll!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb39e7a79b UE4Editor-UnrealEd.dll!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb39ead0bf UE4Editor-UnrealEd.dll!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ff639a1ed22 UE4Editor-Cmd.exe!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ff639a15783 UE4Editor-Cmd.exe!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ff639a159ea UE4Editor-Cmd.exe!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ff639a248da UE4Editor-Cmd.exe!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ff639a2584e UE4Editor-Cmd.exe!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb846681f4 .DLL!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007ffb8742a251 ntdll.dll!UnknownFunction ]
ProcessResult.StdOut: LogInit: Display: LogOutputDevice: Error: end: stack for UAT
ProcessResult.StdOut: LogInit: Display: LogClass: Warning: FDoNNavigationQueryData::Origin is not initialized properly
ProcessResult.StdOut: LogInit: Display: LogClass: Warning: FDoNNavigationQueryData:estination is not initialized properly
ProcessResult.StdOut: LogInit: Display: LogAutomationTest: Warning: FDoNNavigationQueryData::Origin is not initialized properly

Around same time, I had those problems with navigation after adding your pack the FDoNNavigationQueryData error also appeared.
It comes and goes. Very strangely too. When I load the project some times the navigation data is there with everything green. Some times it is not. Some times only half the area.
That though falls into the engine and level streaming. Pick it up and shake it seems to fix it SOME times.

I think from Migrating the cog asset is broken :confused:
It’s there with no redirects but just does not want to stop returning that error.

There seems to be an unresolved issue in 4.21.2 which causes an error when nativizing nested widgets (i.e. you create a button as its own widget blueprint, then you utilize that user widget in a different widget, e.g. a menu).
This may get fixed with 4.21.3 (it has been reported to also occur with AnimBPs, so it’s a broader issue) - otherwise, it would require to replace those widgets or exclude them from nativization (widgets in question are the cogs as well as some of the “press button to continue” template messages).

As some users claim that this issue only occurs when upgrading from 4.20 to 4.21, it might suffice to recreate the widgets in 4.21.
You can also change the default widget used by the Fade Component to anything else and ignore the cogs for now.

The plugin comes compiled for Win64, do you account for that (rebuild it yourself for your target platform)?
It is a very simple blueprint library and should work with any platform.

Removed the cogs.
I was only using then to show activity in case of a freeze.

Went through a whole completely unrelated mess of updating SDK that was not working properly. After talking to numbers people that quit because of similar issues and not making it easy

Went through the process again and it gave the error differently:
Two files had names to long in the lss system for me to get them into to DLC file

Were you able to solve that issue? Either by changing the file names or making sure the project you compile has a short path and name, to begin with (e.g. “C:\ProjectX” rather than “C:\My Projects\Unreal Engine Projects\ProjectX”).

Can you point me to the files in question, I’d like to make sure they are in compliance with the limits set in marketplace guidelines.

It seemed like ONE file
Something like DTT_LSS_Package_size?
I just put package size into the browser and found it.
Then I tried again and it didn’t work giving SAME error. Not sure if I may have entered a bad name but Found a file that by then I was wondering if it was the same or maybe a similar one? Fixing that the error vanished. And removing the cogs, obviously removed that issue.

Getting that SDK stuff settled out seemed to be a HUGE part of the issue. Seems I was having some crazy things going on with SDK installed but bad references on some things.
Took note on the the nested widgets (I have them in your LSS, in my inventory, in main widget etc. I use them quite a bit)

Just removed them from the list. Everything seems to be okay unless I use the packaging wizard. I believe there is an error there at this time.
Today, I packaged from the file menu, and I created multi, armv7 and armv64 and expansion files.
Few warnings related to material shaders in some of the versions but success and uploaded to google play without error. And only problem is a friend of mine that’s running KitKat 4.4.4 (api 17 when mine requires at least api 26)
Errors in packaging wizard are something in a header. Expects no version of something after something line 2011 (I figure I’ll have to open the cpp and look but I cant see why if everything else works right) and Fewer but, still a couple of the error messages that are nothing but a list of memory.

So I would say any issue with YOUR product seems to actually be related to small details in the engine:
Packaging Wizard seems to hate it for the DLC portion of packaging
Navimesh hates it (related to level streaming, while “fixed” any time i move them a bit, I basically have to destroy them and recreate them to fix them)
Nested Widgets dont want to go native.

But otherwise it functions perfectly with what it is supposed to do. Loads on Android, Handles my loading screen, brings in the level. Progress Bar works. Random play tips work. Random loading backgrounds work. (I only have one right now but it always loads it)

Some times, strangely on mobile after tapping to continue, it reloads a dead version of loading screen for few seconds. Doesnt do it when launched or run in editor and not every time. I’m guessing level just isn’t COMPLETELY ready yet? And First time screen loads, the image is bit out focus.Figure I can load it to memory during the movie or something but havent cared to try.

This video is bit dated, but can see what I did with your system on a phone and how it functions.
SOUND WARNING! (stupid recorder)

Rewatching that video…sheesh some of that stuff is UGLY

I bought this last year and finally I come to the point where I could use it. Like a poster before me, I have an Open world setup and wanted to use it for the delay between my menu screen and loading the initial world which does not work. I was looking into some alternative scenarios that where mentioned here, but I didn’t get it to work. I’m not angry that I spend my money invain because I’m sure that it works for other scenarios, it’s just that for this one it’s not usable, which is a shame because I guess that all open world scenarios suffer from a long initial load time and could really benefit from this.
I also think that for many people this system is simply too complex and introduces problems based on it’s versatility that many people don’t even use.
My suggestion therefore would be to make a completely new product for the Openworld use case that is simple and just exposes the “get percentage” functionality. Let’s face it: Most of use want to show a simple graphic screen with a progress bar that goes away once the OpenLevel node is done with the world loading. That’s it.
I understand you can only do this with a C++ plugin and I am completely ignorant when it comes to UE source code, so there is no way for me to do it, but I’m sure many people would appreciate it. I would even spend money again for a working solution.

Hey Wallenstein,

Just to make sure, by “Open World Setup” you are referring to World Composition specifically? (I’m also assuming a single player setup here). In this case, you are correct, as there is no direct way to query World Composition for its loading activity, LSS is not streamlined to handle it automatically. However, I have a solution laid out and am planning to test and implement it in a future update (as the user you then would only enable a “Use WorldComposition” checkbox in the level’s settings file).

Thinking on it, if that’s what you are after and you are willing to handle UI yourself, then you should be able to achieve what you need with the tools already provided (bar the streamlined setup) using just the “BPC_LSS_LoadingProgress” component with a setup similar to “Start Polling Loading Progress” (function in BP_LSS_Actor).

I’ll have to test it myself, but if you are interested in that path, drop me an email and we could discuss your particular setup in more detail.

Fair point, it is indeed quite a daunting task to create a system that is both highly customizable and super easy to use.
Though, for most types of level transitions, the current setup should be rather unobtrusive (save for the requirement of Level Streaming).
Do you have any particular problems in mind that could be better showcased or handled differently?

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;

}

  • PIE won’t always give you workable results with level streaming, however, Standalone should be fine.
  • Keep in mind that “GetAsyncLoadPercentage()” will return -1.0 if the package is not currently being loaded (this includes already loaded levels).
  • Instead of checking all levels by file paths (which should work also), you could instead use “GetWorld()->GetStreamingLevels()”

Alright, thanks for the help. I was able to figure it out and make a function that returns the NOF levels being loaded and the percentage. There’s a few tricks here: First it seems that the initial load is always bloacking, so say you load the persistent map and then materialize your character somewhere in the world, UE will load the level supporting the character and perhaps some surroundings but it will block until all levels are loaded.
So I made a small box at the edge of the world in the persistent level and materialize there which goes fast. Then I teleport to the final location and now the function is called in Tick and returns the loading state of the streaming levels.
Also it seems UE is loading one at a time only so if you get the loading percentage you will get results from 0-100 while one level is loaded but if the teleportation loads multiple levels, neighbors that are visible, then the percentage counter will start from 0 again when the next one is loaded.
With these two tricks in mind I should be able to make my own small loading screen. Hopefully you can use them to enhance your product to work with world composite in the future.
Good luck.

I was anticipating the initial blocking and thought of the same approach (teleporting), but the sequential loading is a bit unfortunate indeed as it would basically render the progress indicator useless.

I’ll have a look if there are settings to set it to
simultaneous streaming - or if World Composition exposes a list of levels “in range”, or at least the distance value of its layers.

​​​

You get a list of levels being loaded, when you check all levels returned by GetWorld()->GetStreamingLevels() and check which ones are “Loading”. Apparently there is a list of all those to be loaded after teleportation so you counld take the total NOF those levels, set this equal to 100% and then return the percent level of the actual level, say you have 2 levels being loaded, you equal that to 100% and then you return 0-50 while the first one is being loaded and 51-100 while the second is loaded or so.

That’s good news. If the levels that World Composition should load are being flagged as “loading” at this point already, that should work well indeed.

Even better would be to get the package size of each level, for a much more accurate result.

Supplementary code plugin (optional for progress bar feature) compiled for Engine Version 4.22 can be downloaded here.

Hi,

in my game the player spawns at a random location designated by spawn point blueprint actors which I have placed around my level. But when I implement the loading screen the player always spawns at the same location. How can I fix this?

Sorry for the delay. If this issue still persists, can you elaborate, how your spawning is set up currently - i.e. where is that logic being executed?

In general, for each of your levels, you can create a map settings asset, as described here: LSS Pawn Handling.
Look for the section “Spawn Location”, here you can designate a specific spawn location (by class, tag or soft reference).
This does not support random selection, however.

If you prefer to manually place your pawn, make sure not to spawn it in your root level’s BeginPlay, else it would be spawned before the level is actually loaded. You could run your code in a custom event bound to the “OnLoadingCompleted” event (see example map “06_AdvancedEventHandling_Map”).