Visual Studio can't find .h file

Hi Guys,

Trying to start an Unreal project from scratch and running into a stumbling block.

  1. Created new class from Unreal.
  2. I see the cpp and h files appear in VisualStudio, and I see the new class in Unreal under C++ classes
  3. BUT, the “#include xx.h” says it can’t OPEN the *.h file?
  4. The odd thing is the Unreal project compiles without apparent error, and I see the new function available in BluePrint Event Graph

Unreal created it and put it in the Visual Studio project, so what’s the deal?

This is the very first new C++ class I’ve added.

I’ve tried several times now and keep hitting the same issue. I’m missing something here …

Any ideas?

Try to rebuild the Visual Studio files might do the trick. In your main project folder:

You’ll see round blue icon, with the white letter “U”, representing thee Unreal Engine, inside that folder. The type should read “Unreal Engine Project File.”

Right-click on that icon, then left-click when the text appears which reads: “Generate Visual Studio Files”

:+1: Fail Faster - there is no instant win :+1:
Twitter: @GamedevCala - Blog: - Twitch: GamedevCala

Thanks for the quick reply.

That didn’t do it, but adding the *.h files folder to the VC++ Include directories did work. (Project -> Properties -> VC++ Directories -> Include Directories -> Edit …"

I don’t understand why I should have to add that path … makes me worry that something else is goofy… but I am so early in the process, I really haven’t done anything that could mess anything up … Just created a new UE project, imported a few assets, created a new level and populated a level with static mesh’s.

This was literally the first thing I tried to do in Visual Studio.

Ugh. It’s working now, I guess I’ll move forward.

Thanks again!

Privacy & Terms