# Struct values get reset to default when modified in an instance

**URL:** <https://forums.unrealengine.com/t/struct-values-get-reset-to-default-when-modified-in-an-instance/399047>\
**Category:** Blueprint\
**Tags:** reproducible-bug, unreal-engine, bug-report, editor, question, Blueprint\
**Created:** [June 21, 2017, 8:51am UTC](https://forums.unrealengine.com/t/struct-values-get-reset-to-default-when-modified-in-an-instance/399047 "2017-06-21T08:51:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jujaswe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jujaswe](https://forums.unrealengine.com/u/Jujaswe)\
**Post date:** [June 21, 2017, 8:51am UTC](https://forums.unrealengine.com/t/struct-values-get-reset-to-default-when-modified-in-an-instance/399047/1 "2017-06-21T08:51:21Z")

</div>

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 -

> **[BugTest.zip](https://www.dropbox.com/s/io2djuaja2huhep/BugTest.zip?dl=0)**
>
> Shared with Dropbox

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.

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [July 3, 2017, 8:07pm UTC](https://forums.unrealengine.com/t/struct-values-get-reset-to-default-when-modified-in-an-instance/399047/2 "2017-07-03T20:07:27Z")

</div>

Hi Jujaswe,

Thank you for the report. I was able to reproduce this issue and have created [JIRA UE-46795](https://issues.unrealengine.com/issue/UE-46795). Our developers will be investigating further.

-TJ

---

<div class="post-metadata">

**Author:** ![Stormrage256](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/stormrage256/32/1008648_2.png) [@Stormrage256](https://forums.unrealengine.com/u/Stormrage256)\
**Post date:** [November 1, 2017, 11:40am UTC](https://forums.unrealengine.com/t/struct-values-get-reset-to-default-when-modified-in-an-instance/399047/3 "2017-11-01T11:40:11Z")

</div>

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