Why does my UStaticMeshComponent have no details in Blueprint?

Created a class based on Actor, I’m adding a UStaticMeshComponent, setting as RootComponent and spawning the actor in game.

If I pause and examine the actor, the static mesh component is ‘native’ and doesn’t show any details. If I then create a Blueprint based on my actor it looks like this:

Is the lack of details/components because this is a ‘native’ static mesh component? How do make my static mesh configurable? My next step is to add a material to the mesh, but looks like something is wrong.

Code as follows, class is called BlockBase.

.h

UCLASS()
class ABlockBase : public AActor
{
	GENERATED_UCLASS_BODY()

	TSubobjectPtr<UStaticMeshComponent> myStaticMeshComponent;
	UStaticMesh * myStaticMeshObj;
};

.cpp

ABlockBase::ABlockBase(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
	static ConstructorHelpers::FObjectFinder<UStaticMesh> myStaticMesh(TEXT("StaticMesh'/Game/Meshes/cube-no-back.cube-no-back'"));
	myStaticMeshObj = myStaticMesh.Object;
	// Create
	myStaticMeshComponent = PCIP.CreateDefaultSubobject < UStaticMeshComponent >(this, TEXT("mySubObject"));
	// set as root
	RootComponent = myStaticMeshComponent;
	// Set Mesh
	myStaticMeshComponent->SetStaticMesh(myStaticMeshObj);
}

You have to add some additional code to let Blueprint see your components.

This article will help to understand how it works.

You can find list of all available Property specifiers right there

UCLASS()
class ABlockBase : public AActor
{
    GENERATED_UCLASS_BODY()
    UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Kittens) 
    TSubobjectPtr<UStaticMeshComponent> myStaticMeshComponent;
    UStaticMesh * myStaticMeshObj;
};

Brilliant thank you zeOrb!

I am not able to declare ‘BlueprintReadWrite’, why?

It should be BlueprintReadOnly.