Download

Getting a bit annoyed with project management... unable to find headers etc.

So for a while now i’ve been trying to arrange my project files nice and tidily. I’ve had a nice filter setup that i really liked. It worked great!

Then i clicked “add new code to project”, and BAMF it’s gone! it’s all gone!

So i tried a slightly different approach, i figured if i made physical folder locations for everything in my project, it might keep them. BUT, now i’m unable to compile the editor because “cannot open source file “blah.h””.

So i’ve just tried a new, more drastic approach… since i figured for whatever reason, UE4 might do something funky with folder settings… I started an entirely new project, from scratch! And this time i did “add new code to project” and used the wizard to create the folders for me. And it STILL can’t find any of the header files in the folders that the UE4 wizard set up.

So what gives here? am i just going to have to live with the fact that there’s no good project organization for UE4 projects? Or am i missing something really simple here?

All the best!

If I understand you correctly here, you get errors when trying to include a header that is in a subfolder. Have you tried "#include “subfolder/header.h”?

Hey am guessing you forgot to include the new directories in YourGameName.Build.cs.
e.g:



        PrivateIncludePaths.AddRange(new string] { 
           		"YourGameName/Game",
			"YourGameName/Interactive",
			"YourGameName/Online",
			"YourGameName/Pickups",
			"YourGameName/Gathering",
			"YourGameName/Player",
			"YourGameName/Player/Camera",
			"YourGameName/Player/UI",
			"YourGameName/Player/Animation",
			"YourGameName/Player/Inventory",
			"YourGameName/Weapons",
			"YourGameName/World"
            });

hope it help.
WCode

Thanks WCode.

You are welcome, glad I could help. :slight_smile: