What I do and don't recognize

What I recognize

  • Naming of our classes (UPositionReport::UPositionReport()). If I remember correctly this part of the cpp file must be the constructor.
  • I see float DeltaTime used in the cpp file. I’m sort of familiar with this from Unity, but barely.
  • The header file has public and protected classes. I see virtual void being used here, and I know what that is from past C++ classes; this must be where the inheritance aspect of the game is, but it’s too early for me to say anything about it. I’m also trying to relearn this part of C++, so I’m waiting to see more.
  • The header file has the constructor under public.

What I don’t recognize:

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class BUILDINGESCAPE_API UPositionReport : public UActorComponent
{
GENERATED_BODY()

  • I don’t know what the above is.

  • The headers included in PositionReport.h

  • PrimaryComponentTick.bCanEverTick = true; I don’t know what this one is.

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
This is a macro which hooks into Unreal, letting it know that this is a Thing that can exist in the game. Specifically, the meta tag lets Unreal know that this thing is expected to be created from Blueprint.

class BUILDINGESCAPE_API UPositionReport : public UActorComponent
This class is called UPositionReport, and it inherits functionality from Unreal’s UActorComponent.

GeneratedBody() is, I think, part of the Unreal Header Tool, which acts similar to a macro, to add things to your class so it plays nicely with the rest of the engine.

Privacy & Terms