Good Day,
I’m reporting some issues with the MoviePlayer.h class. Following this guide;
If you look at this block below under the MyGameInstance.cpp:
FLoadingScreenAttributes LoadingScreen;
LoadingScreen.bAutoCompleteWhenLoadingCompletes = false;
LoadingScreen.WidgetLoadingScreen = FLoadingScreenAttributes::NewTestLoadingScreenWidget();
GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
A variable called LoadingScreen is being declared of type FLoadingScreenAttributes. Note the tutorial also doesn’t mention: #include “Runtime/MoviePlayer/Public/MoviePlayer.h” (It should).
After making sure to include the MoviePlayer, FLoadingScreenAttributes still seems incomplete.
If you go to MoviePlayer.h and search for the FLoadingScreenAttributes struct, it will be declared improperly.
struct MOVIEPLAYER_API FLoadingScreenAttributes {…};
It should be declared as
struct FLoadingScreenAttributes { … } MOVIEPLAYER_API;
This fixes the use of FLoadingScreenAttributes.
To add to this, at the very bottom of the MoviePlayer.h class there are functions declared:
/** Creates the movie player */
MOVIEPLAYER_APIvoid CreateMoviePlayer();
/** Destroys the movie player */
MOVIEPLAYER_API void DestroyMoviePlayer();
/** Gets the movie player singleton for the engine. /
MOVIEPLAYER_API IGameMoviePlayer GetMoviePlayer();
MOVIEPLAYER_API IGameMoviePlayer& GetMoviePlayerRef();
/** Returns true if the movie player is enabled. */
bool MOVIEPLAYER_API IsMoviePlayerEnabled();
By removing the MOVIEPLAYER_API call these functions can now be used properly.
I don’t know how this worked in previous versions, but this is the change I had to do to make it work in 4.16