When make new class in editor it generate .cpp and .h files, there are already some checks in precompiler or something like that about places of “.generated.h”, UCLASS() and GENERATED_UCLASS_BODY(), but would be much helpfull and time saving add comment to them like next:
//this include in current file must be always last #include "%yourclass%.generated.h"
this macros always should be before class declaration and soesn't allow side code between this macro and class declaration UCLASS()
//this macro should always be first in class declaration and doesn't allow side code between GENERATED_UCLASS_BODY()
//include other files only before this last one #include "%yourclass%.generated.h"
UCLASS() /*this place can't hold any other code for proper macros working*/ class ...
class.... /*this place can't hold any other code for proper macros working*/ GENERATED_UCLASS_BODY()
Also helpfull comment needed in files generated on NONE class telling about need of including “%your class%.generated.h” and some explanation about inheritance of UObject and special constructor
...(const class FPostConstructInitializeProperties& PCIP): Super(PCIP)
These simple comments in generated files can save a lot of time.