Why does the C++ generated Pawn header file have two public sections?

In version 4.19, a newly generated C++ class inheriting from Pawn comes with two public declaration sections. Furthermore, neither Tick nor SetupPlayerInputComponent can be made private, as they were in previous versions of Unreal. Making them private results in an unresolved external symbol error.

What has changed to require this structure?

Default generated Tank class inheriting from Pawn:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "Tank.generated.h"

class BATTLETANK_API ATank : public APawn

	// Sets default values for this pawn's properties

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

1 Like