When I delete a class’s .cpp and .h file from Visual Studio, rebuild the project, the class still remains in the Editor’s Content Browser though. Is this expected? How do I clear it out this phantom class from the Content Browser?
Reproducible steps:
New C++ code FPS template project
Delete the game mode class
Look at Content Browser… it is still there under C++ classes…
Deleting files in VS won’t delete files physically, why then it compiles non-project files you may ask? UE4 has it’s own build system called UnrealBuildTool and technically it does not need VS at all other then it’s compiler. Project files are not needed at all, they are just for convince to use VS for codeing, so modifying them won’t effect UBT at all, it build everything that is in Source directory according to build scripts (C# code you may find in source directory). So deleting files physically from source directory and regenerateing VS project file (for synchronization, you can do that by right clicking uproject file, you will see option there) is a lot more effective. It’s not really UE4 fault, VS simply expects build system to build accordingly to project file
There really should be an option to delete C++ class directly from the Unreal Editor’s Content Browser. Isn’t that like the basic fundamental file management functionality?