I’m not sure what i’ve done, if anything… But i booted up UE4 today to start working on my project, but now any time i try to add new code to project through the wizard (doesn’t matter what type it is, i’ve tried multiple classes) i get this error:
But then once i click “ok” i get this:
it’s creating the .cpp and .h files for the class i’m trying to create (which is why it now says it’s already in use. However it’s not creating the generated files called by GENERATED_UCLASS_BODY, and as far as i can tell it’s not creating “blahblah.generated.h” either.
I just ran into the same problem and found a quick fix.
My problem turned out to be the module I activated for my game in “.Build.cs” file.
I added the Editor module to this file (“UnrealEd”) without linking the Engine Source Code.
The game was compiling and executing just fine, but problems started to occure when I tried to add new classes or Refresh Visual Studio from the Editor.
The Solution is simple :
first : you have to delete the “bad modules” (if you included some) in your “.Build.cs”.
then : delete the “garbage files” you miss-generated (both in visual filters and in your hard drive (.pdb, .cpp, .h,…).
finally : rebuild your game from visual, then use the “Refresh Visual Studio project” button in the editor.
At this point, you can add again your modules but this time linking the engine sources. (And garbage classes shouldn’t be anymore in the builtin class-viewer).