Can't see USceneComponent array in editor

Hello, I have a ship object that I want to add scene components to in the blueprint editor and add them to an array but I can’t see the array in the editor. this is what i currently have in the .h file

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “SpawnPoints”)
TArray<TObjectPtr> MyComponentArray;

I have also tried

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “SpawnPoints”)

TArray<USceneComponent*> MyComponentArray;

Neither of these show an array in the editor. is this not something I can add through the editor?

This will be in the Details panel:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “SpawnPoints”)
TArray<TObjectPtr<USceneComponent>> MyComponentArray;

If you want it in Components panel you need to add it to the Constructor: ( I’m not sure if it’s possible to use TArray, you need to add them individually ) :

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “SpawnPoints”)
TObjectPtr<USceneComponent> MyComponent;

MyComponent = CreateDefaultSubobject<USceneComponent>(TEXT("MyComponent"));
MyComponent ->SetupAttachment(RootComponent);

This still isn’t showing anything in the details panel.

Basically I want to place scene components on the ship object in the blueprint editor and save them to an array. I can create the points in code and add them to an array I just wanted to do it in the editor.

It’s probably the TObjectPtr<>, try TArray<USceneComponent*>. Nested containers are kinda hit or miss with the editor.

I have tried this and get same result, For now I’m just doing the array in c++ and moving the scene components in the editor but I would still like to learn why I can’t see the array in the details panel.

I just tested this, and yes, it doesn’t show up in Class Defaults. But you can enable Show Inherited variables in the My Blueprint tab, which will list it along with the other variables, then select it to edit it in the Details Panel.


Also noticed that if you drag the blueprint into the level, the array shows up in the details panel. (even with show inherited variables off.)

Found more info on This Reddit Post:

Maybe this part of the Blueprint Editor Defaults Tab explains this behavior?

Object reference property default values are not currently exposed.

This means you currently cannot, for instance, access the default property values of component templates or other archetypes within a Blueprint Class

Though, I am not 100% sure what exactly they mean with “object reference property”.

This solution was it, I can see the array in the details panel now Thank you. Also is there a way I can add a Scene component from within the editor none of the created components show up in the drop down menu.

Not sure (though I vaguely remember seeing something about it, can’t seem to pinpoint what it was. Will share if I remember).

Searching around, I found this:

But the drop-down was still empty. Though the array did show up in class defaults.

More info on FComponentReference:

It does work, but you can only select the component when placed in the level, not in Class Defaults.

You’ll need to specify the UseComponentPicker meta tag in the UPROPERTY:

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spawn Points", meta=(UseComponentPicker))
	TArray<FComponentReference> MyComponentArray;