I am trying to spawn a floor, I have the static mesh made and the actor class made. I added this in the header:
UStaticMeshComponent* MyPtr;
I added this in the constructor:
MyPtr = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("CubeMesh"));
ConstructorHelpers::FObjectFinder<UStaticMeshComponent>MeshRef(TEXT("Game/ThirdPerson/Meshes/CubeMesh.CubeMesh"));
MyPtr->SetStaticMesh(MeshRef);
The last MyPtr Im using says that its a pointer to an incomplete class. I really don't know what's going wrong and ive been trying for quite some time.
As far as I know MyPtr is a UStaticMeshComponent, which is a class so how can it give that error. Anyway, Im new to this language, I've googled and am still confused as to why this is happenning. Help is greatly appreciated