Hi. This is my first project using C++ and I’m really having a lot of trouble with Instanced Static Mesh Components.
I have the following code:
Mesh = CreateDefaultSubobject<UStaticMesh>(TEXT("Mesh"));
static ConstructorHelpers::FObjectFinder <UStaticMesh>StaticMesh(TEXT("StaticMesh'/Game/Geometry/FloorSM.FloorSM'"));
Mesh = StaticMesh.Object;
ISMC = CreateDefaultSubobject<UInstancedStaticMeshComponent>(TEXT("Instanced Static Mesh Component ISCM"));
ISMC->SetStaticMesh(Mesh);
And the result:
The Floor/walls are just the default cube. Am I missing something here?