Q:

What if I extend a uclass without UClass() in Unreal Engine?

What happens if I extend a uclass (or UObject) without the UClass() macro?
Will it still be a UClass() and managed by the garbage collector?
I'm just curious.
Update
I managed to extend ULineBatchComponent without UCLASS nor GENERATED_UCLASS_BODY(), it compiled, did not complain, and I could instantiate it.

A:

UCLASS evaluates to a marker used by the Unreal Header tool to inject various bits of code, typedefs, attributes, and other bookkeeping information related to Unreal's reflection (and thus garbage collection) systems.
Anything that has UCLASS should also have GENERATED_UCLASS_BODY in the body of the class. Without both of those, your code shouldn't compile or link.
Failure to include UCLASS causes UHT to skip generation of the YourFile.generated.h header, which you should be including, and if you're not including that header you'll get compilation errors within the evaluation of GENERATED_UCLASS_BODY.
It may be possible to hack up the source file to get it through the compiler somehow (I stopped trying after a few basic attempts) but at that point you won't be able to instantiate or completely use the class because you won't have the related type info metadata Unreal's object system requires for things like NewObject to function.
tl;dr: bad things, don't do it.

