StructUtils plugin's FInstancedStruct can prevent serializing Blueprint's Class Defaults

See repro steps

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:

  1. Enable plugins: `StructUtils`, `StructUtilsEngine`, and `StructUtilsEditor` (for just the editor)
  2. Define a `USTRUCT(BlueprintType)`, `FMyInstancedStructParent` in cpp.
  3. Put a `UPROPERTY(EditAnywhere)`, `MyProperty`, of type `FInstancedStruct` on that struct.
  4. Create an actor component, `UMyComponent`. Put a `UPROPERTY(EditAnywhere)`, `MyArray`, of type `TArray<FMyInstancedStructParent>` in the component.
  5. Compile and launch editor.
  6. In BP, define a BP struct, `S_MyBPStruct`.
  7. In BP, derive from our actor component (`UMyComponent`), `AC_MyComponent`.
  8. Create a BP actor and add `AC_MyComponent` to it.
  9. In the component’s defaults, add a few items to the array. Don’t populate their `FInstancedStruct` yet.
  10. Save and compile the BP actor.
  11. Observe the array during the BP’s `BeginPlay` (debugger, printf, whatever). Notice that number of items in the array is correct.
  12. Now populate the `FInstancedStruct`s on the array elements with `F_MyBPStruct`.
  13. Save and compile the actor.
  14. Add additional entries to the array and populate their `FInstancedStruct`s.
  15. Save and compile the actor.
  16. 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.

Hello [mention removed]​,

Thanks for the detailed repro steps. Have you had a chance to try this in UE 5.5 or the 5.6 Preview? There have been some changes to the StructUtils module since 5.4 that might affect this behavior, so it’d be useful to confirm if the issue persists in those versions.

Please let me know.

Best,

Francisco

Hello [mention removed]​,

Sorry for the delay in response. I was able to reproduce the issue in UE 5.4 as described. However, after testing the same setup in both UE 5.5 and 5.6, I can confirm that the issue no longer occurs. The array and all FInstancedStruct entries behave as expected even after populating them with Blueprint-defined structs.

That said, migrating a project from UE 5.4 to 5.5 won’t resolve corrupted class default data already saved in Blueprints or levels. You’ll need to replace or reconfigure affected actors to clear out the broken data. Once that’s done, everything should function normally.

It’s also worth noting that as of UE 5.5, StructUtils has been marked as production-ready and is now part of the main engine module, per the official release notes.

Please let me know if this information helps.

Best,

Francisco

Woah, formatting on that got completely mangled. One sec - fixing.

Fixed!

Hi Francisco,

No, I haven’t had a chance to repro in a newer version. Sorry about that.

Hello [mention removed]​,

No worries. I’ll run a few tests on my end and follow up with what I find as soon as possible.

Best,

Francisco

Thanks, Francisco! That’s great to hear that it’s fixed in >=5.5. Yet another reason to upgrade, I suppose :). Cheers!