Issue with UStaticMeshComponent, C++, & Blueprints

***** STEP 1 *****
I added a UStaticMeshComponent to my BP:


UPROPERTY(EditAnywhere, Category=“ACE”)
class UStaticMeshComponent* MeshComp;

[My Constructor]

MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
RootComponent = MeshComp;
  1. When I click on the Blueprint, the category “ACE” is NOT shown.
  2. When I click on MeshComp, the details panel is completely empty.

I’ve restarted, re-built, and re-compiled (even from the editor) and I can’t get it to show anything.

***** Step 2 *****
Changed to UPROPERTY:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ACE", meta = (AllowPrivateAccess = "true"))
class UStaticMeshComponent* MeshComp;

Enable show inherited varibles in MyBlueprint.

  1. The category ACE is visible in MYBlueprint section, but I clicking on MeshComp is still blank.
  2. Changing the value of MeshComp, compiling, and saving from the MyBlueprint section just results in the value being reset to nothing?

Any thoughts? Thanks

Seems similar to the bug I am encountering here as well:…chetype-object

Really frustrating.

Edit: Posted a workaround on that thread.

This may sound counter-intuitive, but ActorComponents, should have VisibleAnywhere rather than EditAnywhere in the UPROPERTY specifier, else you will end up with a drop down list. Also make sure you don’t hot reload. It will cause issues where detail panel is empty, etc. Always close editor before compiling changes to class structure and class constructor. Live Coding can be used for changes in functions on classes. Google Unreal LiveCoding to learn the limitation.