But same result, UMediaPlayer is still underlined in red an I cannot get any intellisense when doing “theMediaPlayer->”. I am also including it at the top of my cpp “#include “Runtime/MediaAssets/Public/MediaPlayer.h””
Then I don’t understand question. What exactly is the problem? Does it crash at runtime? Are there any errors? What result are you expecting, and how does it differ from what you’re seeing?
As you can see, UMediaPlayer is underlined in red and is not recognized. When I type “theMediaPlayer->” no functions are displayed. I cannot call any functions from UMediaPlayer on the pointer.
It’s almost like i am missing an include or a reference but I am including UMediaPlayer at the top and I have the MediaAssets reference in the build.cs.
Intellisense might be getting confused with the relative paths. Since we changed our include logic to “include what you use” in 4.14, we don’t add the full relative path to the module anymore; only the relative path inside the module, for example:
That didn’t do it but I found something interesting.
Even though I am getting errors saying UMediaPlayer is undefined, everything compiles and actually works!
I was able to do the following:
theMediaPlayer->Pause()
And it worked, it paused the video. But like I said, I still see the red lines and Intellisense does not work nor does syntax highlighting (acting like its undefined). But at least it functions and works programmatically :D.
I’ve never seen this behavior before and I wonder why its happening. I cleaned my cache and the rest too. Thanks again for the help!