Component details panel blank if pointers stored in struct array

Hey,

the blueprint details panel is blank if I store the component pointers in a struct + array but the details panel of placed actors works. It works fine if I declare them without struct and array. What am I doing wrong?

In header of actor but outside of the class:

USTRUCT(BlueprintType)
struct FTestStruct
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Test")
	USceneComponent* testComponent;

	FTestStruct()
	{
		testComponent= nullptr;
	}
};

In the actor header:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Test")
TArray<FTestStruct> testStructs;

In the constructor:

FTestStruct testStruct;
testStruct.testComponent = CreateDefaultSubobject<USceneComponent>("TestComponent");
testStruct.testComponent->AttachTo(RootComponent);
testStructs.Add(testStruct);

Greetings

Hello, Reisn7CC

It looks like you had created the Blueprint before the struct was added to the class. Please recreate the Blueprint.

Hope this helped!

Cheers!

Thanks for the answer. I probably created the blueprint before I created the struct but I just created a new blueprint and unfortunately the details panel is still blank.

Sorry to hear about that.

Please note that there is a possibility that in Blueprint editor Details panel is blank because in Components tab some Component of Blueprint (but not the Blueprint itself) is selected.

Hope this helped!

Have you ever fixed this issue? I’m having the exact same problem - array of structs that have pointers to components and those fields are completely invisible, other fields of the struct are visible and editable as always.

What’s more tricky, is that I can edit those components through the struct on an instanced object present on a map, but not from defaults in the BP editor.