I’m going through the tutorials, and am running into many compiler errors. For example, in Components and Collision, I had to add
#include "Components/SphereComponent.h"
so that the following would compile
USphereComponent* SphereComponent = CreateDefaultSubobject<USphereComponent>(TEXT("RootComponent"));
Then, on the next step, I get a compiler error I can’t figure out:
UStaticMeshComponent* SphereVisual = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("VisualRepresentation"));
SphereVisual->SetupAttachment(RootComponent);
where “Pointer to incomplete class type is not allowed”. This error appears in many of the tutorials. I’m using 4.19.1. How do I fix this?
(P.S. I get a JSON error if I put “C++” in the topic title when previewing or posting this topic.)