Hi I’ve been playing around with Lyra and looking at its core plugins like the loading screen, thinking it would be a great addition to some other projects.
I understand some of these tools are really integrated and cannot be used on their own, but the loading screen looks like it should work by itself as far as I can tell.
However if I enable it on another project it won’t go away after the other map has already loaded, the Log showing: bCurrentlyInLoadMap is true as the reason why it’s still visible indefinitely.
This happens both with or without a loading screen widget selected in the project settings.
So is there another subsystem or Event needed that i have to implement or call somewhere? It seemed like it’s just bound to “HandlePostLoadMap” which appears to be a default function within Unreal.
Guessing it might be hooked into OnExperienceLoaded which is Lyra-specific. It’s probably waiting for that event to fire, but it never does, because that is native Lyra code.
You’d want to implement something similar to that in your own project if not using the Lyra core.
The C++ node gets the ULoadingScreenManager subsystem and registers a “loading processor.” The subsystem is checking on tick for the load requests. It then displays the widget specified in project settings.
After the loading screen is shown, the map is loaded via Load Level Instance (by object reference):
The returned Level Streaming Dynamic object has two delegates, On Level Loaded and On Level Shown. My assumption would be On Level Shown fires after the number of seconds specified in “Hold Loading Screen Additional Secs” param in project settings. Apparently this is to prevent blurry textures due to texture streaming, but it isn’t applied by default in the editor.
Which unregisters and removes the loading screen. So, to remove the screen you simply need to store a reference to the loading screen task when you create it and then call the unregister function. This worked fine for me when I ported the plugin to my project