I did the Programming Quick Start guide. I’m just trying to change the asset from the starter content cube to a custom one I imported from an fbx. I imported the asset and changed this line :
static ConstructorHelpers::FObjectFinder<UStaticMesh> CubeVisualAsset(TEXT("/Game/StarterContent/Shapes/Shape_Cube.Shape_Cube"));
to this :
static ConstructorHelpers::FObjectFinder<UStaticMesh> CubeVisualAsset(TEXT("/Game/Meshes/rock"));
It compiles, I even put a debug message in the Succeeded block :
if (CubeVisualAsset.Succeeded())
{
UE_LOG(LogTemp, Warning, TEXT("Found the static mesh"));
VisualMesh->SetStaticMesh(CubeVisualAsset.Object);
VisualMesh->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
}
that I see when I drag and drop my C++ actor in the scene :
but the visual is still a cube, instead of my own mesh. What am I missing ?