Header files will not open

I’m right clicking on default pawn actor in my hierarchy, choosing open DefaultPawn.h, nothing happens. Also, in Class Viewer, open c++ header file does not work. However, when I add my own new class to the project, visual studio opens afterward. \o/

Hi Clunk,

Hmm it may not search the install location for headers, I think the code expects to find them from a relative path from your game’s solution.

Is this from the binary version or one you compiled from github?

Cheers,
Nick (Epic Games)

Having this same issue, found here:

Binary. Downloaded from email link sent by you guys :smiley:

Yeah - if creating the class works, then it’s not the express issue. Which leads me to think it’s a pathing issue.

Ok, I’ll look into it.

I did follow the setup instructions HERE, even the debug stuff at the bottom. I’ve tried VS 2012 but w/ that I can’t even create classes, I get an error that the name already exists when ti doesn’t lol. Sucks because intellisense doesn’t work in 2013 either. Any eta on engine update?

When you installed the launcher did you put it somewhere other than the default location. When you created your game project, did you create it in the default location? Trying to reproduce it locally with the launcher version - haven’t had any luck yet.

Not sure about the VS2012 bug. This particular problem shouldn’t have anything to do with the version of Visual Studio.

Yeah, unfortunately I have Windows on a 64GB SSD, and don’t want to use my 750GB 5400rpm HDD for the OS, and UE4 won’t fit on the SSD. I may just end up uninstalling all of my programs from the SSD, moving them to the HDD and putting UE4 on the SSD. Hell I should just get rid of Unity3D from my SSD, doesn’t look like I’ll be using it for a while :wink:

Ok! That’s probably the issue. I’ll see if I can reproduce and fix it with it installed on another drive. Thanks for using UE4! :smiley:

Yeah I’m watching some UE4 tutorials and practicing so I’ll probably do the move tomorrow and get back w/ you, thanks for the assistance good sir!

Ok - I can reproduce it, but only if the project is a blueprint game project. If it’s a C++ project, even if it’s on on another drive - it opens. Was this on a blueprint project?

Got workaround while you wait for a fix.
Problem is (i think) that visual studio project files aren’t generated by default in non-code projects. To solve this you have two options:

  1. Create new c++ class using “add code to project” from menu, which automatically generates these files. But if you do that remember to compile it straight away. Because if you finish working without compiling you won’t be able open your project in unreal editor until you compile it in VS.

  2. Create empty folder named Source in your project directory, and right click on unreal project file : Generate Visual Studio Projects.

If you don’t have that option you can use command line for this:

<PathToEngine>\UnrealEngine\4.0\Engine\Build\BatchFiles\RocketGenerateProjectFiles.bat -project=<PathToProject>\MyProject2.uproject

It was a blank project with no code or blueprints included, but I did make a few BPs on my own before trying. Don’t BP and Code work together though?

Yeah they work together - but we rely on the solution file existing before we load headers. I believe the issue was linked to that, we need to have better reporting in the editor. As soon as I added code to the project (File > Add Code To Project), it creates the solution. The next time I launch the editor and open the project, it works. It was odd that it wouldn’t open the headers even after creating the solution, I had to restart the editor. Then all the headers would load just fine.

I’ll take a look tomorrow now that I’ve got a repro case.

Cheers,
Nick (Epic Games)

Very cool man, I’ll check it out tomorrow as well, I’m good w/ learning Blueprints for the next couple of days anyway, it’s helping me learn the classes and functions pretty quickly, really nice. Thanks for all the help man, I greatly appreciate it! :smiley:

Thank you for this. I’ll try it when I get home.

Fanastic this worked for me, I suspect point 2 below would work also by xarn.