I am getting this error message when trying to add new classes (even with random profane names) to shootergame project. My first error message comes up as “Failed to add class [classname]. Failed to automatically hot reload the ‘ShooterGame’ module”. Then this error message comes up (name already used by another class, though it clearly isn’t) Imgur: The magic of the Internet
The editor log output shows the following:
Info Parsing headers for ShooterGameEditor
Info Reflection code generated for ShooterGameEditor
Info Performing 4 actions (4 in parallel)
Info PCH.ShooterGame.ShooterGame.h.cpp
Info Module.ShooterGame.cpp
Info ShooterGame.generated.cpp
Error C:\blah\ShooterGame\Source\ShooterGame\Private\Weapons\ShooterWeapon_Instant_FU.cpp(4) : fatal error C1083: Cannot open include file: 'ShooterWeapon_Instant_FU.h': No such file or directory
Info -------- End Detailed Actions Stats -----------------------------------------------------------
Info ERROR: UBT ERROR: Failed to produce item: C:\blah\ShooterGame\Binaries\Win64\UE4Editor-ShooterGame-5669.dll
Info Cumulative action seconds (4 processors): 0.00 building projects, 38.42 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
Info UBT execution time: 47.69 seconds
Afterwards, the class itself is created and present in the VS project, but not in the UE4 editor. If i try to build in VS, it fails complaining that the new .cpp file cant find the .h file which is clearly there. Restarting editor doesnt work. Clearing all local generated files (intermediate, build, VS project files etc) doesnt work.
To get VS building, I found that removing the #include “Classname.h” from the generated Classname.cpp actually let it build. But this new class doesnt show up in the UE editor…
Using the prebuilt binary 4.7.3 engine.
VS2013 Ultimate
This is really frustrating me, as all I want to do is to be able to add new classes without wasting my nights trying to figure out this stuff that should just work.
What is alsoconfusing is that I have been able to add classes in the past. And sometimes when I try adding a class, it seems to work… but then trying to add another class in the same spot just fails.