# Blueprint variables reset to default

**URL:** <https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452>\
**Category:** Blueprint\
**Tags:** UE4-17, actorcomponent, unreal-engine, bug-report, Blueprint, question\
**Created:** [August 9, 2017, 3:35am UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452 "2017-08-09T03:35:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dingtech](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dingtech](https://forums.unrealengine.com/u/dingtech)\
**Post date:** [August 9, 2017, 3:35am UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452/1 "2017-08-09T03:35:27Z")

</div>

There is an issue after importing from 4.16 to 4.17 that causes an Actor’s ActorComponents to reset instance variables to their defaults, when the actor is referencing a variable from the actor component.

To reproduce:

1. In engine version 4.16 create a BP\_ActorComponent blueprint (parent of ActorComponent). Give it a bool variable called bDefaultOn, make it instance editable. Compile and set its default value to be true. Also give BP\_ActorComponent a vector called “SomeVector.”

2. Create a BP\_Actor blueprint (parent of actor). Assign it a BP\_ActorComponent created above. Create a function called SomeFunction, that takes in a vector, and just outputs it to a log or something

3. In BP\_Actor, override the Hit Event. Drag a pin from the Hit event and call SomeFunction. Get a reference to the actor’s BP\_ActorComponent, then from that get a reference to SomeVector. Use the reference of SomeVector as the input to SomeFunction.

4. Drag an instance of BP\_Actor to the map. In that instance, change the bDefaultOn bool var in that instances BP\_ActorComponent to false.

5. Compile, Save All, and close.

6. Switch the project to engine version 4.17

7. Open the project

8. Observe that the instance actor on the map still has its BP\_ActorComponent’s DefaultOn var set to false.

9. Compile the BP\_ActorComponent blueprint. Observe that the instanced actor’s BP\_ActorComponent’s bDefaultOn variable is now true/on.

Ive been able to repeat this also with variables stored in blueprint objects. Also, compiling the BP\_Actor does not seem to cause this, just compiling the actor component.

---

<div class="post-metadata">

**Author:** ![m0useCat064](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@m0useCat064](https://forums.unrealengine.com/u/m0useCat064)\
**Post date:** [September 13, 2017, 6:27pm UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452/2 "2017-09-13T18:27:45Z")

</div>

I’m having this issue as well with my main project, though I haven’t managed to follow all the steps here to reproduce it in a new and simpler project. My project has moved from 4.15 all the way up to now at 4.17 and involves multiple levels of BP inheritance. Looks like constantly keeping the engine up to date may not be ideal if little things like this happen.

My current workaround is to load up a different map, decline to save, and then load back the map I was in.

---

<div class="post-metadata">

**Author:** ![scha](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scha/32/1135430_2.png) [@scha](https://forums.unrealengine.com/u/scha)\
**Post date:** [September 19, 2017, 9:46am UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452/3 "2017-09-19T09:46:43Z")

</div>

I have the same error. There is an easier way to reproduce, without 4.16, see : [https://answers.unrealengine.com/questions/707103/compiling-bp-actor-component-resets-all-variablest.html](https://answers.unrealengine.com/questions/707103/compiling-bp-actor-component-resets-all-variablest.html)

---

<div class="post-metadata">

**Author:** ![Todd.Vance](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Todd.Vance](https://forums.unrealengine.com/u/Todd.Vance)\
**Post date:** [September 22, 2017, 8:30pm UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452/4 "2017-09-22T20:30:41Z")

</div>

I can confirm it happens in 4.17.1. Not just with variables, but with “return a boolean value”, which probably uses a variable under the hood. I made some unit tests, that all passed, then I quit UE4 and restarted and suddenly one test started failing…because the checked box unchechecked itself!

---

<div class="post-metadata">

**Author:** ![dingtech](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dingtech](https://forums.unrealengine.com/u/dingtech)\
**Post date:** [October 25, 2017, 2:37am UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452/5 "2017-10-25T02:37:45Z")

</div>

This is resolved for me in 4.18

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a52a201a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a52a201a](https://forums.unrealengine.com/u/anonymous_user_a52a201a)\
**Post date:** [November 30, 2017, 8:24pm UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452/6 "2017-11-30T20:24:59Z")

</div>

Happening here as well, 4.17

---

<div class="post-metadata">

**Author:** ![zincr0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zincr0](https://forums.unrealengine.com/u/zincr0)\
**Post date:** [May 2, 2019, 1:38am UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452/7 "2019-05-02T01:38:52Z")

</div>

4.22 and still happens. Two years old bug.
