Struct values get reset to default when modified in an instance

Hi there,

There is a bug in the engine where setting a value from a custom structs inside BP components are being reset to default after editing it in the actor’s instance. I discovered this bug when my marketplace customers reported it.

This is how I reproduced the bug:

  1. Create an Actor Component BP

  2. Create a custom struct with a custom enum variable and other
    variables (e.g. integer, boolean, etc)

  3. Add multiple variables of type “custom struct” inside the component.
    Set them to Editable.

  4. Now set some default values for these inside the component,
    especially for the enum.

  5. Create a blueprint Actor then add the component to the actor

  6. Place the actor in the level/scene

  7. Click on the component of the instanced actor then edit any of the
    struct variables

  8. The values should then reset to default values

I also uploaded a project in which I did these steps here -

The component is attached to the ThirdPersonCharacter BP. If you edit
the speed of the Follow Config, the enum will also reset.

It should be noted that if default values are not set inside the
component or actor, then the bug doesn’t happen. Unfortunately, this is
unacceptable for my product since I need to set default values so my
customers don’t have to bother with all of them.

I hope you can fix this bug. I think this is still related to circular dependency.

Hi Jujaswe,

Thank you for the report. I was able to reproduce this issue and have created JIRA UE-46795. Our developers will be investigating further.


Hi TJ, do you know if this issue will be getting a fix in any of the upcoming v4.18 patches?