How to expose component to blueprint editor?

I want to expose component what was created by script to blueprint editor like “Mesh1P” of shooter game’s character.

// In Header

UPROPERTY(VisibleDefaultsOnly, Category=Mesh)

TSubobjectPtr{USkeletalMeshComponent} BodyMesh1P;


// In Constructor

BodyMesh1P = PCIP.CreateDefaultSubobject{USkeletalMeshComponent}(this, TEXT(“BodyMesh1P”));

// Some do like shooter game


I coded like above, that was copied from shooter game. but it does not work.

That looks like it should work. Are you not seeing the BodyMesh1P property at all? Did you recompile in VS before running the editor? Is your Blueprint derived from you C++ class?

It appeared after several re-compilation. BTW Should I compile only with “Development” mode in VS? Maybe “Debug” mode did not effect this problem. And “Rebuild” command only worked not “Build”. In addition to, “Compile” in Rocket did not work too. Is it normal situation? Finally when can I use Rocket’s “Compile” button?

Compile in editor appears to not always work properly with UProperties. They will address this issue in a future release.

However Blueprint’s tooltip said that component is missing.
‘MISSING! Native BodyMesh1P’
And it does not attach to capsule component.