Summary: `FInstancedStruct` in a cpp-defined struct in a `TArray` on an actor component defined in C++ and implemented in BP. Populating the instanced struct in an actor BP’s class defaults breaks serialization of the class defaults.
Repro Steps:
- Enable plugins: `StructUtils`, `StructUtilsEngine`, and `StructUtilsEditor` (for just the editor)
- Define a `USTRUCT(BlueprintType)`, `FMyInstancedStructParent` in cpp.
- Put a `UPROPERTY(EditAnywhere)`, `MyProperty`, of type `FInstancedStruct` on that struct.
- Create an actor component, `UMyComponent`. Put a `UPROPERTY(EditAnywhere)`, `MyArray`, of type `TArray<FMyInstancedStructParent>` in the component.
- Compile and launch editor.
- In BP, define a BP struct, `S_MyBPStruct`.
- In BP, derive from our actor component (`UMyComponent`), `AC_MyComponent`.
- Create a BP actor and add `AC_MyComponent` to it.
- In the component’s defaults, add a few items to the array. Don’t populate their `FInstancedStruct` yet.
- Save and compile the BP actor.
- Observe the array during the BP’s `BeginPlay` (debugger, printf, whatever). Notice that number of items in the array is correct.
- Now populate the `FInstancedStruct`s on the array elements with `F_MyBPStruct`.
- Save and compile the actor.
- Add additional entries to the array and populate their `FInstancedStruct`s.
- Save and compile the actor.
- Observe BeginPlay again.
Expected behavior: The array has the correct count, and the `FInstancedStruct`s contains the BP struct.
Actual behavior: The array contains only the entries from before the `FInstancedStruct`s were populated.
I considered packing up a project, but I think the repro is fairly simple. And the link in the prompt ([Creating and packaging a repro project for [Content removed] is dead.