Not sure if this is a bug or intended behavior but thought I’d ask.
If I have an EditAnywhere TArray which contains pointers to some component class, when I go to edit defaults in the blueprint, I don’t see anything in the Details panel.
Setup:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
TArray<USceneComponent*> TestComponents;
In the construct for the class I have:
USceneComponent* Temp = CreateDefaultSubobject<USceneComponent>(TEXT("1"));
TestComponents.Add(Temp);
Temp = CreateDefaultSubobject<USceneComponent>(TEXT("2"));
TestComponents.Add(Temp);
I do see both components show up in the tree hierarchy in the blueprint editor window, which I would expect. However, when i click on one, the Details panel always ends up being empty, so I cannot edit any values.
I believe the reason is due to this function:
FComponentEditorUtils::CanEditNativeComponent()
While iterating through the native class properties, the first check is to cast the property to UObjectOProperty
UProperty* Property = *It;
if (UObjectProperty* ObjectProp = Cast<UObjectProperty>(Property))
This always seems to fail for array properties.
I wonder: should there be another check for array properties? or are they specifically excluded for some reason?
Thanks!