.cpp
AChunkC::AChunkC()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;
mesh = CreateDefaultSubobject<URuntimeMeshComponent>(TEXT(“Runtime Mesh”));
RootComponent = mesh;
SetActorLocation({ 0,0,0 });
}
.h
UPROPERTY(EditAnywhere, Category = “Chunk”)
URuntimeMeshComponent* mesh;