I’v noticed that for certain UE classes, whenever I use UE4Editor to create a C++ class derived from that class, the generated header and cpp file will have some boilerplate functions already declared and defined. Is there an easy way for me to make this happened with my own classes that I create? For example, certain UFUNCTION specifiers or commenting markup that results in this? I tried looking at Actor.h but didn’t see anything obvious that would result in this, but it’s got to be a result of something. So I thought I’d see if any of you guys know?
As an example, whenever I create a class derived from “Actor” (actually called AActor), the following is automatically generated by UE4Editor:
in MyActor.h:
// Sets default values for this actor's properties
MyActor();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
in MyActor.cpp, an example of one of the definitions:
// Called when the game starts or when spawned
void MyActor::BeginPlay()
{
Super::BeginPlay();
}