Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UMediaPlayer does not compile with visual studio

I'm trying to get a UMediaPlayer variable in visual studio. Here are the errors I get: https://gist.github.com/fornof/c6657e18eb1d4090b29c1195821e5d3e 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: https://answers.unrealengine.com/questions/740950/cannot-open-source-file-namegeneratedh.html

This is my Actor cpp: https://gist.github.com/fornof/f78211e5242f5fb050874a947e0e7726 This is my Actor .h : https://gist.github.com/fornof/fbb542c7ff8f0a0b1598b4777b3ae99e

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: https://www.reddit.com/r/unrealengine/comments/6maxct/help_uclassgeneratedh_issue/ could I be referencing UMediaPlayer incorrectly? Any help would be appreciated. Thanks


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.

Product Version: UE 4.20
more ▼

asked Aug 06 '18 at 05:09 PM in C++ Programming

avatar image

16 2 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Build.cs was my issue, I included "MediaPlayer" in it and it builds now.

more ▼

answered Aug 30 '18 at 09:06 PM

avatar image

16 2 4

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question