The PositionReport files

In PositionReport.cpp I recognise the preprocessor directives (#include).
Below that I see what looks like a constructor, as it shares the same name as the file (only it has a U in front of it, but I assume it is still considered a constructor).
The functions are also preceded with UPositionReport:: which I’m not sure about. The two functions below the constructor have the same thing inside their blocks of code, only this time they are Super:: before the function name. I recognise this to be a call to the super class (or parent class) which retrieves the code there for use in the function.

In PositionReport.h I again notice the preprocessor directives (#include & #pragma).
After that there is a bunch of stuff I don’t understand:
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
I’m guessing this is stating the type of class that’s being created?
Underneath looks like some kind of class declaration, but it is very different from what was in the BullCowGame.
It contains what looks like a function called GENERATED_BODY() and below that are the public functions. Preceding the BeginPlay() and TickComponent() functions is “virtual” which I think has something to do with overriding functions, but I’m not sure what it’s exact role is. These functions are also followed by “override” which I think is saying that these functions exist in the parent class but will be overridden in this class.

Thanks for sharing your understanding here.

Privacy & Terms