I want a few cubes to spawn as soon as the game begins, so I used
GetWorld()->SpawnActor<ACube>(ACube::StaticClass(), Location, FRotator::ZeroRotator, ActorSpawnParams);
So I know this worked because I print some debug lines inside ACube::Tick… But the actor is not visible in the game.
In the constructor I initialized a box component like this:
BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("PyramidCube"));
So what am I missing?
Is there another component I need to add?
Do I need to do something else with the box component itself?