I’m trying to get a UMediaPlayer variable in visual studio.
Here are the errors I get:
This is basically saying it cannot find a source .generated file
Commenting this out compiles the solution:
//#include "..\Source\Runtime\MediaAssets\Public\MediaPlayer.h" // this does not want to compile
I have this in the Project.Build.cs:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "MediaAssets" });
PublicIncludePaths.AddRange(new string[] { "MediaAssets/Public", });
I tried this but it did not work:
This is my Actor cpp:
This is my Actor .h :
Do I need to build the engine from source to get rid of the .generated files not being found?
I found this suggesting that the .h files compile unless there is something wrong with them:
could I be referencing UMediaPlayer incorrectly?
Any help would be appreciated.
Thanks
-Robert
Edit: I found the issue: my .h file had copied code in it at the bottom. I found and removed it and now everything works fine.