Struct in MoviePlayer.h improperly declared

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();


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& 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

1 Like

Hi jamesraiken,

Sorry for not getting back to you sooner on this. I ran through the tutorial on the wiki page that you mentioned, and it seemed to work fine for me in 4.18.3. I looked at the code in MoviePlayer, and it does not appear to have been changed much since 4.16. Is this still giving you some trouble?

Hi jamesraiken,

We have not heard back from you for a while. Do you still need help with this issue? I will be marking this post as resolved for internal tracking purposes, but please feel free to add a comment and re-open this post if you need any additional assistance.

I am currently on Unreal 4.22.2 and the issue doesn’t seem to be resolved. FLoadingScreenAttributes still seems to be incomplete. After following the steps jamesraiken described
it works, but it would be awsesome it this would work in the future without editing these lines.

Do you include the module “MoviePlayer” as documented at F Loading Screen Attributes | Unreal Engine 5.4 Documentation | Epic Developer Community ? (“.Build.cs” → PublicDependencyModuleNames.AddRange(new string { “MoviePlayer” }); as seen at e.g. GitHub - ue4plugins/LoadingScreen: A plugin for Unreal Engine 4 to expose simple controls for managing load screens. )

Without doing so, I get the same compiler errors.

Confirming the issue on 4.24.3
Editing the MoviePlayer.h as described fixed it.
(for every non full programmer trying: you need to clean the solution then before building it again)