Download

Why a SceneComponent sub-object of a SceneComponent won't show in detail window?

The code is like this. I’m adding an arrow component to a custome component.


UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
class UMyComponent : public USceneComponent
{
...
public:
...
    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    UArrowComponent* LookAtDirection= nullptr;
...
};


and in ctor



    LookAtDirection = CreateDefaultSubobject<UArrowComponent>("LookAt", true);
    LookAtDirection->SetupAttachment(this);


I was hoping this component will show in components structure with the name “LookAt”, but it’s now showing.
This is what I get:
Untitled.png
Thanks for your help.

Try UPROPERTY(VisibleAnywhere)