Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    Just got the Nick's plug-in to work, I am soooo happy, now I can pass testing for the console!!!! Yeaaaaaaaa THANK YOU NICK!!!!

    Comment


      #62
      Originally posted by Helghast View Post
      quick question: Is possible to use a FLoadingScreenAttributes and GetMoviePlayer() during a Seamless Travel + Transition Map? I can't do it on my tests.

      Thx.
      @TheJamsh

      For everybody trying to get seamless travel to work with loading screen, it IS possible, I've figured it out, without too much additional modifications to TheJamsh's code.

      you'll first need to make the functions callable from blueprint:

      Code:
      UCLASS()
      class MYPROJECT_API UMyGameInstance : public UGameInstance
      {
          GENERATED_BODY()
      
          public:
          virtual void Init() override;
      
          UFUNCTION(BlueprintCallable, Category = "Loading")
              virtual void BeginLoadingScreen(const FString& MapName);
          UFUNCTION(BlueprintCallable, Category = "Loading")
              virtual void EndLoadingScreen(UWorld* InLoadedWorld);
      
      };
      Then, use these exact settings if you want your loading screen to work automatically for both seamless and non-seamless travel. The key component is LoadingScreen.bAllowEngineTick = true; This allows the game thread to continue running while playing a movie, imitating the behavior of a non-seamless loadscreen call.

      Code:
      void UMyGameInstance::BeginLoadingScreen(const FString& InMapName)
      {
          if (!IsRunningDedicatedServer())
          {
              FLoadingScreenAttributes LoadingScreen;
              LoadingScreen.WidgetLoadingScreen = FLoadingScreenAttributes::NewTestLoadingScreenWidget();
      
              LoadingScreen.bAutoCompleteWhenLoadingCompletes = true;
              LoadingScreen.MinimumLoadingScreenDisplayTime = 6000;
              LoadingScreen.bMoviesAreSkippable = false;
              LoadingScreen.bWaitForManualStop = false;
              LoadingScreen.bAllowEngineTick = true;
      
              GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
              GetMoviePlayer()->PlayMovie();
          }
      }
      
      void UMyGameInstance::EndLoadingScreen(UWorld* InLoadedWorld)
      {
          GetMoviePlayer()->StopMovie();
      }
      Then inside blueprints (I'm using my Lobby's pawn, that works for me), call your functions as such:

      Click image for larger version

Name:	Capture.PNG
Views:	35
Size:	157.7 KB
ID:	1668447

      side note: I dont think Begin Loading Screen "Map Name" variable needs a value since it's not used.

      This will show the loading screen on all clients and listen server until your final map has finished loading.

      Comment


        #63
        Is there some reason the plugin version doesn't have the references to Widgets? Also -- does it not work in PIE / VR Preview? It only seems to do anything for me if I play standalone...

        Comment

        Working...
        X