Seamless, Proper Loading Screens! [Play Movies, Audio & Animated Widgets!]

After being somewhat frustrated with the loading screen solutions I’ve seen people follow so far, I’ve decided to share how I handle Loading Screens in my Hovertank Game.

IMO I think this is personally the best (and most sensible) way to go about it. Current examples require all sorts of workarounds to implement such as loading into different levels, using streaming for the entire project etc - completely defeating the purpose of a loading screen in the first place. Less than 20 lines of code lets you avoid all of this.

  • No temporary maps or streaming level nonsense!
  • No additional calls, nodes or setup required, engine code automatically handles all transitions and kicks in when a map is triggered to load. All you have to do is call Open Level, or Join Session etc…
  • No conflicts in PIE.
  • Can easily play Movie Files, Audio Files & Animated widgets
  • No Garbage Collection / reference issues.
  • MoviePlayer is supported on all major platforms
  • Integrates seamlessly with an existing project.

There’s a very minimal amount of C++ to set this up (very minimal), and I’ve pasted full source that you can easily copy-paste into an existing project.

5 Likes

Thanks for sharing this! (:

Woo! It’s a Christmas miracle! Thanks for this :slight_smile:

Thank you very much.

ok bookmarked for future referance

quick question though, see-ing as my project uses other(plug-in/steam) for the gameinstance how would i add that together with your fix

Bookmarked as well. Such a mechanic should be built in the engine.

The code in my Game Instance is absolutely minimal, you should be able to copy it into your custom game instance and everything will work as before :slight_smile:

Nice share TheJamsh, I actually have a Blueprint equivalent – I had to do this for something I released last year requiring multiple levels / loading screens.

Its not as straight forward for obvious reasons, but achieves similar results.

Thanks for sharing with the community!

thanks share

Have updated the OP to contain a bit more information

Thank you, this is incredibly helpful!

Thanks for the sharing.

What happen in case of SeamLess Travel? Is it drawing your loading screen?

Thank you!!

Great tutorial man, thanks for sharing :smiley:

Wow, thanks for sharing! I’ve been looking at several different ways of doing this, and this is by far the best method I’ve seen.

I have this working and it’s great! One thing to note is that it does not seem to work in PIE - so I actually had it working long before I knew I had it working… :slight_smile: As long as you run in standalone all is groovy. Many thanks to the author!!

I do have one question though. In the FLoadingScreenAttributes struct, it says that the WidgetLoadingScreen can be used to display a custom widget during loading. Can this be used with a UMG widget or is this a Slate widget? If it can be used with UMG can you provide info on how this is done? – Thanks, .

antsonthetree, Yes, this can be used with UMG widget:


UUserWidget* LoadingWidget; // Pointer to your UMG widget

FLoadingScreenAttributes LoadingScreen;
LoadingScreen.WidgetLoadingScreen = LoadingWidget->TakeWidget();

2 Likes

Thanks for sharing this.

But i have no clue abaout C++. 8 years ago a coded in C (or LIITE-C), but i forgot all. Your WIKI is good, but i don’t know, in what files i have to put that code. Can you explain this with Little more Detail please? Thank you.