Cannot Remove a C++ Class

Greetings. My problem seems pretty simple but …

I am attempting to delete a C++ class that I have created using the editor. The steps seem fairly simple:

  1. Close Visual / UE4 Editor
  2. Remove the class .cpp and .h from disk in explorer
  3. Remove everything in Game\Binaries *optional
  4. Run GenerateProjectFiles.bat
  5. Recompile

My problem is that there is no GenerateProjectFiles.bat located at:

C:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles

The only file located there is RocketGenerateProjectFiles.bat. When I execute this I get:

This doesn’t seem like the right batch file. What is going on here? :slight_smile:

Any help would be appreciated.

Edit: Added image of no-right click option

Rather than using the batch file do it from the .uproject file.
Right click your project file and select the “Generate Visual Studio project files.”

This should fix your issue.

Thank you for the response. To be honest, there is no option to “Generate Visual Studio project files” when I right-click on my uproject file. All I can do is the standard Window commands.

I did go to https://answers.unrealengine.com/questions/200241/generate-visual-studio-project-files-did-not-auto.html and I can see the option on the gif there but for some reason I don’t have the option.

I will attempt to attach an image.

Alright, the issue was that for some reason Unreal was not properly registered in the Windows registry, so there were no right-click commands available. I found a nice batch file that someone made that properly registers Unreal at:

Once Unreal was registered, I was able to right-click and see the options. From there I generated a new project file and the classes were gone.

Thanks calben :smiley: