Improve C++ Source File Removal/Detection in Editor.

Right now the editor is ~not good~ at removing unwanted C++ classes; the option to delete C++ classes is grayed-out/inaccessible in the editor itself, and if you go outside of the editor and remove the source/header files from your file manager (in my case Windows explorer) the editor often fails to recognize that those files no longer exist. As a result, the editor will continue to show ‘ghosts classes’ that you can’t remove/hide/delete even though they’ve already been deleted from your source folder of your project. If you try to open those files, the editor will even take the time to tell you that the files no longer exist and can’t be opened, but it doesn’t refresh the file browser to reflect that and it continues to display those ‘ghosts classes’.

I’ve found that it possible to close everything, delete the files you want to remove in your OS’ file manager, then right-click on your uproject and regenerate visual studio files (on Windows), and it will occasionally fix the issue. Sometimes that doesn’t work, and you have to take the extra step of deleting everything in your Project/Binaries/ folder before regenerating your VS files for it to work! It’s a very annoying workaround to a very strange problem that has to be relatively common - I can’t be the only person to refactor and remove C++ classes from time to time!

I hope you guys can fix this by forcing the editor to check for missing/removed files on opening a project and again when the editor detects that a file can’t be opened or is missing. Or maybe just include a manual ‘refresh’ button to the content browser…

Hey katanaswordfish,

Thank you for your ideas about code removal from the engine and suggested fixes. I have submitted a feature request (UE-12573) for consideration on how to address this issue.



Thats great idea i +1


Thank you x Infinite! I never thought about deleting the binary files from that Binaries folder! You just helped me fix a super-confusing issue I had.


I also made a bug report about this, which is relevant to your workaround quoted above.

This is a really annoying problem. Although clumsy, thank you for the “Generate Visual Studio Project Files” from the context-sensitive menu in Windows Explorer.