Purpose of UFUNCTION, UPROPERTY, UCLASS macros

Hello. All I can find about this macros is a small note in fps tutorial:

I tried remove all this definition from my code - everything compiles and work fine. So what are they? Should I use them everywhere? For example, the BeginPlay() is not decorated with macro.

1 Like

Check out this blog post that Michael did, its a great intro to how the Unreal property system works:

Oh, thank you, didn’t see this post.

There’s also the Gameplay Programming Reference documentation, which goes over the keywords you can supply to each macro. We’re working on adding more information and examples to this section soon, but hopefully it will be a useful starting point! :slight_smile:

If a parent class has say BlueprintType in the UCLASS macro … would a sub-class automatically be BlueprintType without declaring that in its UCLASS macro?

From what I’ve read on Class Specifiers, it seems to be dependent on which specifier you use. I could be wrong though, I’m new.