Description

The behavior for resetting the default for customized struct properties is inconsistent and needs to be reviewed and fixed. Currently we see this behavior:

  1. In non-array properties, the header will be updated on reset to default
  2. In array properties where the members of the array are the customized struct, if the user has added an index (or removed, most likely), then the headers of each index will run and refresh
  3. In array properties where the members of the array are the customized struct, if the user has not added or removed an index, then the headers of each index will not run and they will not refresh

We also need to review if we do want the headers of the member indices refreshed on reset of the parent, or provide a way to do that a bit more easily than what we have at this point. The problem in the UDN is that the array members should be fully refreshed, including the header. We either need to make the reset for the array do that, or most likely enhance the API such that we can provide that capability.

Steps to Reproduce
  1. Create a customized BlueprintType struct TestStruct, ideally one where something in the header would be updated on any refresh (perhaps give it a label with a changing number on it, which would be a different number each time it runs)
  2. Register the customization for the TestStruct
  3. Create an ActorComponent blueprint, we'll call it TestActorComponent
  4. On the blueprint for TestActorComponent, create a variable of type Array of TestStruct, we'll call it TestStructArray
  5. Give it a default value ~ lets say fill out 3 indices with default values each.
  6. Create an Actor in the level editor and add a TestActorComponent
  7. Select the TestActorComponent in the details panel

 

Case 1 ending:

8. Add a 4th index to TestStructArray ~ note that the reset button is available on TestStructArray

9. Click the reset button on TestStructArray

10. Note that all of your headers will update for each index, as well as the default values.

 

Case 2 ending:

8. Alter the value of one of the existing 3 indices ~ note that the reset button is available on TestStructArray

9. Click the reset button on TestStructArray

10. Note that the default values of TestStructArray are reset, but the headers for each index are not updated.

 

Have Comments or More Details?

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

0
Login to Vote

Backlogged
Main Commit24906548
CreatedJun 22, 2023
UpdatedJan 19, 2024