Cannot delete a C++ class in the editor

Greetings. This seems like an easy issue at first but …

Basically, I want to delete a C++ class that I have created in the editor. From what I know, I need to:

  1. Close down Unreal Editor and Visual Studio
  2. Manually delete the .cp and .h files in Explorer
  3. Run the GenerateProjectFiles.bat
  4. Recompile

see How do I remove a C++ class from my project code? - C++ - Unreal Engine Forums

The problem is that I do not have a GenerateProjectFiles.bat file located anywhere in the Unreal editor directory.

When I go to C:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles the only file I can find is RocketGenerateProjectFiles.bat.

Executing this always returns:

ERROR: UnrealBuildTool was unable to generate project files.

Note that I am using a fresh download (4.7.6) of the engine from:

https://www.unrealengine.com/dashboard

Does someone know what is going on here? Everything else seems to work fine but can’t delete a simple class … :stuck_out_tongue:

Thanks!

1 Like

You have to right-click on your projects .uproject file, there you should find the regenerate option.

generate_proj.PNG

Thank you for the response!

What a mess. Apparently Unreal was not registered properly with Windows; I did not have any of those right-click commands. Coupled with the lack of the GenerateProjectFile file, this made removing a class … hard.

If anyone else has this issue, there is a batch file at http://www.davidmoore.info/blog/2014/09/05/fix-the-missing-right-click-menu-for-unreal-engine-projects-uproject/ that will add Unreal to the Windows registry.

Once I did that and regenerated the project, the classes were gone. Thanks!

Nice you got it working!

You get the option to register file associations when you first run the engine.