I’m spawning an actor, and in its constructor, I have the following code:
UStaticMeshComponent* mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("FuelTankMesh")); ConstructorHelpers::FObjectFinder<UStaticMeshComponent> MeshRef(TEXT("/Game/Models/placeholder.placeholder")); mesh->SetStaticMesh((UStaticMesh*)MeshRef.Object);
When I run the game, the object appears in the World Outliner and has FuelTankMesh (inherited) in its Details box, but the mesh is invisible in-game. If I drag the mesh into the game window, I can see that fine.
Does anyone have an idea as to why this is happening?