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!