Create loadingscreen

Hi.

I need help with my game. My game is using world composition and i want to create a loadingscreen for it. I followed this tutorial (the last post) https://forums.unrealengine.com/deve…treamed-levels

Its working fine for me, but i want to costumize the standard loadingscreen that is displayed. So i found this:

Release Notes from 4.2 Rendering New: StreamingPauseRendering allows some rendering to continue while blocking loads complete so that the game does not appear to hang. Default is to display the previous frame with an animated widget in the corner. This can be overridden by providing a custom BeginStreamingPauseDelegate and EndStreamingPauseDelegate.

But there are not tutorials on the internet for this. I think this is exactly what i need. Does someone know how i use this? Thanks

There is a tutorial which tells you how to add a custom loading screen using PreLoad and PostLoad in the game instance. I can’t find it right now sorry but it does something like this:

First you need to add “MoviePlayer” to your depency list in your build file.

Include the MoviePlayer to your custom game instance class.


#include "Runtime/MoviePlayer/Public/MoviePlayer.h"

In UGameInstance::Init


FCoreUObjectDelegates::PreLoadMap.AddUObject(this, &UCustomGameInstance::BeginLoadingScreen);
    FCoreUObjectDelegates::PostLoadMapWithWorld.AddUObject(this, &UCustomGameInstance::EndLoadingScreen);

Then you can define these functions,


UFUNCTION()
        virtual void BeginLoadingScreen(const FString& MapName);
    UFUNCTION()
        virtual void EndLoadingScreen(UWorld* InLoadedWorld);

BeginLoadingScreen


if (!IsRunningDedicatedServer())
    {
        FLoadingScreenAttributes LoadingScreen;

        LoadingScreen.bAutoCompleteWhenLoadingCompletes = false;
        LoadingScreen.WidgetLoadingScreen = FLoadingScreenAttributes::NewTestLoadingScreenWidget();

        GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
    }

EndLoadingScreen can be left emtpy if you don’t need cause the loading screen will hide itself anyway.

This will load the default loading screen of UE4. To make a custom one you need to make a new Slate Class. I am afraid UMG won’t work here. Also note that this won’t work within the editor but it will work in a standalone version of your game.