Hi,
This is a great plugin and worth a lot. That said I really admire you for making the decision to make it free for us. Thank you.
And now to the code itself. I have been using Darnell’s LoadingScreen for a long time, trying to modify it (kinda works), and I have one burning question that I couldn’t figure out: how to manually stop the MoviePlayer (for instance I don’t want to play the loading screen before loading the MainMenu level). What I have tried to do:
- UGameplayStatics::GetCurrentLevelName(GetWorld())) == GetMainMenuLevelName.ToStrin() -> just compared the names
- GetMoviePlayer()->StopMovie(); -> called when condition is met
This didn’t work very well, it sometimes didn’t show up at all. But I guess it was my mistake.
Anyway, the real pain comes when you set bWaitForManualStop = true. In this case, you must somehow stop the MoviePlayer (level loading is done, but spawning actors and setting their positions from a saved game is not yet done, so I want the LoadingScreen to be preset). In this scenario I have a function that is broadcasted:
- FOnLoadingCompleted OnLoadingCompleted
- OnLoadingCompleted calls GetMoviePlayer()->StopMovie();
Yet the LoadingScreen doesn’t disappear. I know this is a big step above the support of the plugin yet I would like to ask you if you know about any solution to solve this mystery To me it appears that the StopMovie() function doesn’t work properly. I took a look into the code of the StopMovie, all steps to stop the Movie were met, yet nothing happened.
My workaround is very primitive, I have created WBP that has only a black image and is displayed until OnLoadingCompleted is called, but you can imagine that the full loading screen logic would be much nicer.
From this, I have a suggestion for two possible enhancements:
- Add a new function (might be BlueprintCallable) that will force stop the LoadingScreen display
- Add an ability to specify Levels (by FString name) that are not affected by the LoadingScreen (even tho it can be done easily in code by myself)
Thanks for the great plugin once again!
Dominik