in 4.8.2 anytime I modify the generated GameMode.h header for a C++ project (I tried both the 3rd and 1st Person Templates) the project stops working. All I have to do for it to break is add another #include and it stops compiling
Doing the same thing in 4.7.6 works perfectly.
I was following the C++ 3rd person tutorial and when I got to the game mode and tried to add an enum class to the header, the project just stopped building properly.
Thanks! That was very helpful!
Somehow being new to UCLASS was throwing me, I was trying to fix the problems in the Error List. By looking at the output I found the real reson the project was not compiling.
Still, in 4.7.6 intelliSense was not complaining about the UCLASS as it does here, that also sent me looking in ther wrong place.
Modifying the header file seems to invalidate the MyClass.generated.h. If errors are related to the generated code (e.g. the UCLASS macro, binding to delegates, etc.) it is worth at least doing a compile so at least you get real errors (or, as in this case, eliminating them!).
Solution was to close Visual Studio and Unreal Editor, then go to your project folder like …
… and delete theIntermediatefolder, then right click yourMyProject1.uproject file and select …
Generate Visual Studio project files
When he is done, open your project again in Unreal Editor / Visual Studio and you should be fine.
I also found out that those errors mostly have their origin in a problem in your code. So instead listening to what the Error List output says, switch to the Output tab, scroll up a bit and you should see the cause.