Compile Button & C++ Classes Missing in Editor

I have a project in 4.7 that doesn’t seem to recognize that there’s C++ in the project anymore. The “Compile” button is missing, and so is the “C++ Classes” section of the Content Browser:

Here’s what I’m expecting:

I originally created this project (back in 4.3 or something) as Blueprints only, but I added C++ later to it and it seemed to be working fine. I’m not sure when the C++ stuff stopped showing up.

I’ve tried adding more C++ to the project through the editor since that’s worked for me in the past, and it opens Visual Studio and compiling there seems to work fine, but the UE GUI still doesn’t recognize that there’s C++, even after closing and opening again.

Anyone know what might be going on here? Hopefully I’ve just made some silly mistake. This has me pretty dead in the water, though :confused: Thanks!

I was just able to create a new Blueprint project from scratch and then convert it to include C++ by adding a new C++ Actor, and the GUI for that is now correctly showing C++ stuff, so there must be some problem with my project itself. Maybe I accidentally deleted some important project file(s) or something? Or maybe it’s because I added source control to the project at some point but the C++ files aren’t in it yet?

Fixed it. Since I didn’t actually need any of the C++ code I had generated earlier, I just deleted all the Visual Studio files to force UE4 to regenerate them:

  • Source
  • .opensdf
  • .sdf
  • .sln
  • .suo

38587-deleted_files.jpg

After deleting those files, I created a new C++ class, and the “Compile” button and the “C++ Classes” entry in the Content Browser now show up correctly in the editor.

I’m guessing I accidentally deleted or messed up one of these files in some way after they were initially generated, but because some of the files still existed, UE4 didn’t regenerate them all when I added more code.

1 Like

Could you open up your .uproject file and verify that your game module is listed under the “Modules” section; also verify that that module exists under your Source directory on disk.

Are you getting a Visual Studio solution generated for your project?

same happened to me here, but I still have some precious code I need, so I guess copying that and import it later after the files are deleted is the best option for me, or are there any other solutions? (for example: not deleting the source folder or creating a copy of the project in the launcher)

Hello Skythedragon,

Have you tried deleting everything clt2488 listed, along with the Intermediates folder but not deleting the Source, and then right-clicking the .uproject file and selecting “Generate Visual Studio Project Files”? You shouldn’t need to delete the source to get this linked back up.

In my case, a simple restart of the Unreal Editor and Visual Studio did the trick. I was working off one of the sample c++ tutorials when this happened.

In my case, I mistakenly removed this line in my main game module code. Without this override, you will unable to see the compile button.

virtual bool IsGameModule() const override
{
	return true;
}
1 Like

please help me compile button is not showing in ue 4.24
And Engine is not detecting vs code.
If a create new C++ component it gives an warning “no compiler is found install Visual Studio 17”.
Please Help me