Why is UE4 Code Project not showing sub folders created within C++ Classes Folder even though they exist?

These were my steps.

Created an empty code project in UDK4.

The editor starts up.

On the left bottom you have:

293477-capture.png

If you try to right click on C++ Classes,

Or select [Add New] while having C++ Classes highlighted

The option to add a new folder is greyed out.

This seems odd, since you can add a new C++ Class and set your sub folder in there.

When the class gets created and our IDE in my case (Visual Studios) opens up the folder gets created in there no problem.

I also tried setting the public or private option when making a new c++ class that just added a sub folder of /private /public where my new class gets nested in code but still not seeing the folder format display on the Unreal Editor.

So what’s going on with UDK4? It seems highly unlikely that the issue is actually a bug.
Is it something I’m doing wrong? Or some second step I need to do?

Different Attempts:

  1. Tried making the sub folder in the class create pop up, that created the folder in Visual Studios but still did not show up in the Unreal Editor
  2. Restarted Unreal Editor to see if it would refresh the folder hierarchy, no luck.
  3. Shutdown both UDK4 and VS and restarted UDK4 then VS also tried VS then UDK4 just in case as a second test.
  4. Attempted to drag and drop a folder into the hierarchy from Visual Studios you just get a red O with a slash next to the mouse icon stating it wont allow it.

Because UE4 (not UDK, thats exclusive name for free version of UE3) asset registrydoes not analize classes on in source directory, what you see in those folder is data from reflection system registed by generated code in your module (and all other modules in the enigne) and won’t be updated until UnrealHeaderTool won’t update that data on recompilation and new version of module get loaded.

You need to remember those folders been primery made for Blueprint only users which are used to asset content browser workflow, to access C++ classes without needing to create blueprint just for that, C++ is not ment to be used as assets. So in other words you should not care much that folder structure there don’t happen live, it’s irrelevant for blueprint users.

Classes should be viewed by there inherence tree and this is what “Class Viewer” is for, you can find it in Windows->Devlopment Tools, it works same way as content browser, you drag and drop placable actors from there. If oyu intentivly use C++ classes you should use “Class Viewer” insted

1 Like

You say

You need to remember those folders
been primary made for Blueprint only
users which are used to asset content
browser workflow,

But this is only partial. They have a huge engine. there wouldn’t be a C++ Classes folder AUTO created on a C++ project creation if their intent wasn’t to help the developer see the classes they have created for their C++ project. Even if using Class Viewer helps that won’t change the fact that their development engine is not recognizing my c++ files, WHICH you need to be able to see to convert to blueprints if c++ to blueprint is needed for the project.

So as far as

C++ is not meant to be used as assets.

I’ll have to disagree on that one.

Also in relation to your statement about the [UnrealHeaderTool]

1 UHT is invoked, which parses the C++
headers for Unreal-related class
metadata and generates custom code
to implement the various
UObject-related features.

2 The normal C++ compiler is invoked
to compile the results.

I clean rebuild both on Visual Studios and UE4 which means I should probably be seeing results. When there’s no errors displayed on both ends. I did manage to find a manual build solution

Newer UE4 just has a rebuild on the project itself

People have mentioned GenerateProject.bat in the Root UE4 make files but that’s not a thing from looking at UE4 make files now.

What has seemed to work is just make your c++ files however you want in your IDE(VS) or UE4 THEN

Right Click your projects .UProject
and select “Generate Visual Studios Project Files”
Default project data location is usually located in

Documents\Unreal Projects[ProjectName]

You will also need to close your UE4 and reopen it.

Problem is with the uproject file, it might be missing a module or the module is misconfigured for anyone else that comes across the problem
“Modules”: []