Description

We found a problem with the component visualizer system and the PreviewActor in the Blueprint editor. If your component is using a FInstancedStruct in anyway, either directly, in a TMap, or TArray, the FInstancedStruct and any data set inside the struct does not get copied over to the PreviewActor. When you call NotifyPropertyModified() on that property it copies the data from PreviewActor which is empty back into the Blueprint.

An important part to this bug is that if you close and reopen the BP editor to respawn the PreviewActor it will now have the FInstancedStruct data instanced correctly. So to get this to trigger you need to add your component, edit the FInstancedStruct, edit the visualizer to trigger NotifyPropertyModified(), and then observe the properties you changed in FInstancedStruct be reset to default.

Steps to Reproduce

[From UDN]

You can trigger this simply with this property on a Component:

UPROPERTY(EditDefaultsOnly)
FInstancedStruct TestInstancedData;

In a Visualizer registered to that Component call this during some edit function:

Property = FindFProperty<FProperty>(UMyComponent::StaticClass(), GET_MEMBER_NAME_CHECKED(UMyComponent, TestInstancedData));
NotifyPropertyModified(VizComponent, Property, EPropertyChangeType::ValueSet);

Adding this code to FSplineComponentVisualizer and USplineComponent would be the easiest way to test.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-239004 in the post.

1
Login to Vote

Unresolved
ComponentUE - Editor - Workflow Systems
Affects Versions5.4
CreatedJan 15, 2025
UpdatedJan 27, 2025
View Jira Issue