Rider can't find Unreal's engine files?

I'm trying to #include a header file that's located in Unreal's engine code, which Unreal says should be included with:

#include "MediaPlayer.h"

But when I do that, Rider says that it can't find the file, even though when I go to the path in file explorer, the .h is there.

I fixed this (kinda) by using a longer path:

#include "MediaAssets/Public/MediaPlayer.h"

But this then made a new problem: now Unreal can't find any of the headers that MediaPlayer.h includes, or any of the ones that those headers include, etc.

So I'm assuming there's a problem with dependencies and pathing and whatnot, but I have no clue how to fix that. I'm currently working in a solution that has two projects: my Unreal Engine project and the UE4 engine code, so when I'm in Rider, I can click through all of the files the compiler can't find and see that they do exist, but Rider can't find them.

How do I fix this?

Thanks in advance! 

Edit: I'm using Unreal Engine 4.27, Jetbrains Rider with the Unreal plugin, and Git for source control. All of these are linked together and work properly, but they may have been involved in causing this problem?

1 comment
Comment actions Permalink

Hello Samathan,

Would you mind checking if MediaAssets dependency is included in your *.Build.cs?

PublicDependencyModuleNames.AddRange(new string[] { ..., "MediaAssets" });

0

Please sign in to leave a comment.