How do I remove a C++ class from my project code?

I did it using the following steps (with UE4.6.1):

  1. close Visual / UE4 Editor
  2. remove the class .cpp and .h from disk in explorer
  3. remove everything in Game\Binaries
  4. run GenerateProjectFiles.bat
  5. open UE4.sln
  6. get back to normal coding activity

If you need to rename a class you can rename the files on disk instead of step 2 and 3 (and then adapt the code to get classname matching filename)

Hope it will work for you too.

13 Likes