#include (still) breaks Generated_Body()
I want to bump an issue that has been in the engine for years** but that has become especially problematic since the IWYU system got shipped. Basically, you can only add as many #includes as you have blank lines above #include "filename.generated.h". If you mess with the lines above the UClass statement in any other way, you get an error saying that Generated_Body() 'has no storage class or class specifier'.
Now, there is a workaround. If you compile in the editor, then refresh the VS project and then reload/reopen the project, the error goes away. Still, it's annoying to have to jump through this hoop every time you want to include something (not to mention, it's frustrating and confusing to people who are new to the engine). I believe this issue got marked as solved, but the problem lingers.
**Since 4.8 according to this thread: https://answers.unrealengine.com/questions/244074/adding-additional-includes-breaks-my-class.html
asked Nov 27 '17 at 10:24 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here