This workflow was taken from the UE4 answershub. In this tutorial you will find the steps required in order to delete a C++ class from your project.
Deleting a specific C++ Class
In order to delete a C++ class from your project follow the steps below:
- Close Visual Studio
- Close UE4 Editor
- Remove the corresponding .cpp and .h file from your disk in explorer
- Remove everything in the folder Binaries
- Right click the .uproject file and click Generate Visual Studio project Files
- Get back to your normal activity
If an error pops up telling you to rebuild the project when launching the UE4 Editor click “Yes”.