# FLoadingScreenAttributes during SeamlessTravel

**URL:** <https://forums.unrealengine.com/t/floadingscreenattributes-during-seamlesstravel/348898>\
**Category:** UI\
**Tags:** seamless-travel, unreal-engine, transition, slate, Widget, question\
**Created:** [February 27, 2016, 8:12pm UTC](https://forums.unrealengine.com/t/floadingscreenattributes-during-seamlesstravel/348898 "2016-02-27T20:12:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helghast](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Helghast](https://forums.unrealengine.com/u/Helghast)\
**Post date:** [February 27, 2016, 8:12pm UTC](https://forums.unrealengine.com/t/floadingscreenattributes-during-seamlesstravel/348898/1 "2016-02-27T20:12:39Z")

</div>

Hello, I have a problem with SeamlessTravel and TranstionMaps.

-Player flow is as follows:  
MenuMap -\>(FLoadingScreenAttributes) → LobbyMap → SeamlessTravel(FLoadingScreenAttributes or UUserWidget) + TransitionMap → MatchMap.

-When player moves from MenuMap to LobbyMap, I can use a slate widget (FLoadingScreenAttributes) to display a loading screen or a movie, and it works smooth and perfectly.

-But when player moves from LobbyMap to MatchMap using a SeamlessTravel+TransitionMap, the same loading screen with the same FLoadingScreenAttributes is never seen (I can see a BP\_SkySphere on the TransitionMap).

The loading screen code in both transitions is this:

```
 //AMyPlayerController.h
UFUNCTION(Reliable, Client)
void ShowLoadingScreen();
UFUNCTION(Reliable, Client)
void EndLoadingScreen();

//AMyPlayerController.cpp
#include "MoviePlayer.h"
...
void AMyPlayerController::ShowLoadingScreen_Implementation()
{
     FLoadingScreenAttributes LoadingScreen;
     LoadingScreen.bAutoCompleteWhenLoadingCompletes = true;
     LoadingScreen.MinimumLoadingScreenDisplayTime = 0.1f;
     LoadingScreen.WidgetLoadingScreen = FLoadingScreenAttributes::NewTestLoadingScreenWidget();
     GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
}

void AMyPlayerController::EndLoadingScreen_Implementation()
{
    GetMoviePlayer()->StopMovie();
}

```

-Is not possible to use loading screens (FLoadingScreenAttributes) during SeamlessTravel and TransitionMaps?

-However, I am able to use as an alternative a UUserWidget and add to Viewport but the animation freezes for a few seconds during the SeamlessTravel+TransitionMap:

```
//AMyPlayerController.h
UPROPERTY(EditDefaultsOnly, Category = "Widget")
TSubclassOf<class UUserWidget> LoadingWidget;

UFUNCTION(Reliable, Client)
void ShowLoadingScreen();
UFUNCTION(Reliable, Client)
void EndLoadingScreen();

//AMyPlayerController.cpp
void AMyPlayerController::ShowLoadingScreen_Implementation()
{
      UUsertWidget* Widget = CreateWidget<UUserWidget>(this, LoadingWidget);
      if (Widget)
     {
            Widget->AddToViewport();
     }
}

void AMyPlayerController::EndLoadingScreen_Implementation()
{
    //GetAllWidgetsOfClass UUserWidget -> RemoveFromParent();
}

```

Any tips? Thx!

---

<div class="post-metadata">

**Author:** ![Helghast](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Helghast](https://forums.unrealengine.com/u/Helghast)\
**Post date:** [March 9, 2016, 8:52am UTC](https://forums.unrealengine.com/t/floadingscreenattributes-during-seamlesstravel/348898/2 "2016-03-09T08:52:13Z")

</div>

Anyone know any advice?  
Thx!

---

<div class="post-metadata">

**Author:** ![ZacharyLewis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZacharyLewis](https://forums.unrealengine.com/u/ZacharyLewis)\
**Post date:** [August 23, 2016, 8:22pm UTC](https://forums.unrealengine.com/t/floadingscreenattributes-during-seamlesstravel/348898/3 "2016-08-23T20:22:16Z")

</div>

Whenever absolute travel occurs, if there is a valid loading screen, it will play the movies and widgets you’ve specified in `GetMoviePlayer()->SetupLoadingScreen(LoadingScreen)` in a separate thread when the game thread blocks to load. During seamless travel, the game thread never blocks during loading, so the specified loading screen never appears.

It should be possible to manually start and stop the loading screen in your `ShowLoadingScreen` and `EndLoadingScreen` functions using `PlayMovie` and `StopMovie`.

```
void AMyPlayerController::ShowLoadingScreen_Implementation()
{
  GetMoviePlayer()->PlayMovie();
}

void AMyPlayerController::EndLoadingScreen_Implementation()
{
  GetMoviePlayer()->StopMovie();
}
```

---

<div class="post-metadata">

**Author:** ![JohnnyDale](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JohnnyDale](https://forums.unrealengine.com/u/JohnnyDale)\
**Post date:** [February 7, 2019, 2:35am UTC](https://forums.unrealengine.com/t/floadingscreenattributes-during-seamlesstravel/348898/4 "2019-02-07T02:35:06Z")

</div>

I have this… and it will never stop for some reason

```
#include "CustomGameInstance.h"
#include "MoviePlayer.h"

void UCustomGameInstance::Init()
{
	Super::Init();

	FCoreUObjectDelegates::PreLoadMap.AddUObject(this, &UCustomGameInstance::OnPreLoadMap);
	FCoreUObjectDelegates::PostLoadMapWithWorld.AddUObject(this, &UCustomGameInstance::OnPostLoadMapWithWorld);
}

void UCustomGameInstance::OnPreLoadMap(const FString& InMapName)
{
	BeginLoadingScreen();
}

void UCustomGameInstance::OnPostLoadMapWithWorld(UWorld* InLoadedWorld)
{
	EndLoadingScreen();
}

void UCustomGameInstance::BeginLoadingScreen()
{
	if (!IsRunningDedicatedServer())
	{
		FLoadingScreenAttributes LoadingScreen;
		LoadingScreen.bAutoCompleteWhenLoadingCompletes = true;
		LoadingScreen.MinimumLoadingScreenDisplayTime = 3;
		LoadingScreen.bMoviesAreSkippable = false;
		LoadingScreen.bWaitForManualStop = true;
		LoadingScreen.MoviePaths.Init("LoadingScreen", 1);
		LoadingScreen.PlaybackType = EMoviePlaybackType::MT_Looped;
		//LoadingScreen.WidgetLoadingScreen = FLoadingScreenAttributes::NewTestLoadingScreenWidget();

		GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
	}
	OnPreLoadMapEvent();
}

void UCustomGameInstance::EndLoadingScreen()
{
	GetMoviePlayer()->StopMovie();
	OnPostLoadMapWithWorldEvent();
}
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ced240eb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ced240eb](https://forums.unrealengine.com/u/anonymous_user_ced240eb)\
**Post date:** [September 27, 2019, 5:50am UTC](https://forums.unrealengine.com/t/floadingscreenattributes-during-seamlesstravel/348898/5 "2019-09-27T05:50:07Z")

</div>

Yes, I’ve posted in answer in the main forum for the loading screen, quite an easy fix!

[https://forums.unrealengine.com/community/community-content-tools-and-tutorials/67244-seamless-proper-loading-screens-play-movies-audio-animated-widgets?p=1668446#post1668446](https://forums.unrealengine.com/community/community-content-tools-and-tutorials/67244-seamless-proper-loading-screens-play-movies-audio-animated-widgets?p=1668446#post1668446)
