# Changing values in base class (C++) does not propagate to child Blueprint

**URL:** <https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, Blueprint, CPP, question\
**Created:** [March 29, 2015, 9:17pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079 "2015-03-29T21:17:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Looman](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tom_looman/32/1215549_2.png) [@Tom\_Looman](https://forums.unrealengine.com/u/Tom_Looman)\
**Post date:** [March 29, 2015, 9:17pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/1 "2015-03-29T21:17:14Z")

</div>

Whenever I change a value in my C++ base class where I previously created a Blueprint child object for won’t update in said child Blueprint. This can cause very confusing and servere bugs when for example you enable replication in your C++ class, but it won’t actually replicate since your BP still has the old value.

---

<div class="post-metadata">

**Author:** ![birdfreeyahoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@birdfreeyahoo](https://forums.unrealengine.com/u/birdfreeyahoo)\
**Post date:** [March 31, 2015, 1:38pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/2 "2015-03-31T13:38:17Z")

</div>

Are you hot reloading? Or do you close the editor before compiling?

I also encountered such behaviour where changing components in C++ doesn’t affect the blueprints derived from it.

---

<div class="post-metadata">

**Author:** ![Tom\_Looman](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tom_looman/32/1215549_2.png) [@Tom\_Looman](https://forums.unrealengine.com/u/Tom_Looman)\
**Post date:** [March 31, 2015, 1:42pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/3 "2015-03-31T13:42:27Z")

</div>

I think it happens in both scenarios, but yes I mostly do hotreloading. Can’t give a clear yes/no on that.

---

<div class="post-metadata">

**Author:** ![birdfreeyahoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@birdfreeyahoo](https://forums.unrealengine.com/u/birdfreeyahoo)\
**Post date:** [March 31, 2015, 6:23pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/4 "2015-03-31T18:23:45Z")

</div>

Do a full recompile (Rebuild Project) with the editor closed.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [March 31, 2015, 6:43pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/5 "2015-03-31T18:43:21Z")

</div>

Hey Tom-

What type of variable are you trying to change in code and where in the code are you changing the value? I was able to create a class with a float variable that was set in the constructor. After creating a BP of the class I was able to change the value in the constructor which showed up in the blueprint after a hot reload. Are you setting the value at another point in the code class?

---

<div class="post-metadata">

**Author:** ![Tom\_Looman](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tom_looman/32/1215549_2.png) [@Tom\_Looman](https://forums.unrealengine.com/u/Tom_Looman)\
**Post date:** [April 5, 2015, 1:57am UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/6 "2015-04-05T01:57:55Z")

</div>

In my case it was setting bReplicates = true in the base class.

Class layout: C++ class (value changed here) \> C++ class \> Blueprint (did not update)

I added them in the constructor. The thing is that after hotreload the values were the original in the Blueprint, but they did how the “revert to default” option. So the engine knew it was no longer considered the default, yet it kept the original value which was supposed to have changed.

I hope that makes sense.

---

<div class="post-metadata">

**Author:** ![Francoberto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Francoberto](https://forums.unrealengine.com/u/Francoberto)\
**Post date:** [April 5, 2015, 4:27am UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/7 "2015-04-05T04:27:00Z")

</div>

If you set a value in C++, in the constructor, it becomes the default in the Blueprint, so when you change the value in C++ the Blueprint will reflect that value if you set this as the default option in the blueprint, (the yellow arrow at the right must not appear).

---

<div class="post-metadata">

**Author:** ![Tom\_Looman](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tom_looman/32/1215549_2.png) [@Tom\_Looman](https://forums.unrealengine.com/u/Tom_Looman)\
**Post date:** [April 5, 2015, 4:35am UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/8 "2015-04-05T04:35:23Z")

</div>

The problem here is that the blueprint should have taken on the new C++ value and it didn’t. What I tried to describe is that it seems that the blueprint had overwritten the value internally even if they are the same value before the change, so on the hotreload the blueprint believes it shouldn’t have to update itself, because we explicitly assigned a value in BP already (which is not the case) - Hope that makes any sense - it’s just a hunch on what I thought might be going on.

---

<div class="post-metadata">

**Author:** ![Francoberto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Francoberto](https://forums.unrealengine.com/u/Francoberto)\
**Post date:** [April 5, 2015, 5:37am UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/9 "2015-04-05T05:37:57Z")

</div>

You are right, I understand you now, if you only hotreload the code, the Blueprint will have the same selected parameter values as before, but its default will be the one you set on C++.  
-If you set bReplicates=true on C++ and hotreload, the Blueprint will have selected the value you had before, but true will be its default. It will have a yellow arrow at the right of the toggle box.

If you compile the C++ code and open the editor, the values you have set on the constructor will be the selected on the blueprint as well (If you have set the parameter to its default).  
-If you set bReplicates=true on C++ and compile from the code editor the Blueprint will have its value ‘Replicates’ set to true too.

So all of this changes will be reflected once you compile the code, not just hotreload it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 6, 2015, 3:06pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/10 "2015-04-06T15:06:42Z")

</div>

Hey -

I was able to verify that the default value of a boolean variable does not update when the default is changed in code. Since this behavior is inconsistent with the behavior of other variables types such as float I have entered a bug into our internal tracking database (UE-13304) for further investigation.

Cheers

---

<div class="post-metadata">

**Author:** ![zeox](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeox/32/467581_2.png) [@zeox](https://forums.unrealengine.com/u/zeox)\
**Post date:** [April 13, 2015, 11:37am UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/11 "2015-04-13T11:37:15Z")

</div>

Hi , I seem to have the same problem with floats as well (trying to change some simple camera defaults). I’ve tried both hot-reloading and doing a full recompile but no dice. any tips?

edit: I should add that creating a new blueprint based on the same class will take the changes, but existing ones will hold on to old values

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 13, 2015, 1:53pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/12 "2015-04-13T13:53:11Z")

</div>

Hey -

Just so I know I’m understanding correctly you’re saying that changing the value of a float in the class constructor does not update in a blueprint after a hot reload? Which version of the engine are you working in? Can you explain how your class and camera is setup in code. Do you see the yellow arrow indicating that the shown value is not the default value?

---

<div class="post-metadata">

**Author:** ![zeox](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeox/32/467581_2.png) [@zeox](https://forums.unrealengine.com/u/zeox)\
**Post date:** [April 13, 2015, 2:02pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/13 "2015-04-13T14:02:27Z")

</div>

I realized after I posted this that changing a simple UPROPERTY float works fine, but trying to change a camera value, something like this:

```
CameraBoom->SocketOffset = FVector(0, 50, 0);
CameraBoom->TargetOffset = FVector(0, 0, 50);

```

does not work. This makes sense to me, I just didn’t realize it at the time

I am using 4.7.5

---

<div class="post-metadata">

**Author:** ![BlueByLiquid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlueByLiquid](https://forums.unrealengine.com/u/BlueByLiquid)\
**Post date:** [January 4, 2016, 5:54am UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/14 "2016-01-04T05:54:59Z")

</div>

,

This seems to be a problem for a number of items not getting propagated to child blueprints. Just a few I’m coming across right now (but have had many more), StaticMeshComponents, rotations, scales, locations. Its almost as though the constructor is only ran once and never again in the child blueprint. I would create a new bug report but I am assuming it is same problem and would be relevant to UE-13304.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [January 4, 2016, 5:33pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/15 "2016-01-04T17:33:15Z")

</div>

Hey -

This is an issue with hot reloading. If changes to code aren’t reflected after a hot reload, closing/reopening the project should update the blueprints with the code changes properly.

Cheers

---

<div class="post-metadata">

**Author:** ![BlueByLiquid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlueByLiquid](https://forums.unrealengine.com/u/BlueByLiquid)\
**Post date:** [January 4, 2016, 6:07pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/16 "2016-01-04T18:07:39Z")

</div>

Hi ,  
Thanks for the response. Can I ask if this is this just an accepted reality or is the issue being worked? I asked because if this is just the way things are we are going to need to change our entire workflow. I can’t imagine this being the way things are expected to work or there would be little value in hot-reloading. The worst part is that it sometimes works as we can’t fine tune things because we never know if we need to reload the entire project or if we can hot reload. If it never worked then ok we can have a defined workflow that while not great we can rely on. Since it sometimes works we will tweak a value, no that value doesn’t look right, tweak again, again, then finally realize it isn’t loading our changes and then reload the project. Or worse yet think a change you made is fine and you check it in then your college opens the file up and you realized you messed something up and you don’t know where you messed it up.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [January 4, 2016, 7:12pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/17 "2016-01-04T19:12:58Z")

</div>

Hot reload is intended to be used to speed up the compile process. I’ve entered a new bug report (UE-24892) to address certain values not updating properly on a hot reload for further investigation.

---

<div class="post-metadata">

**Author:** ![BlueByLiquid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlueByLiquid](https://forums.unrealengine.com/u/BlueByLiquid)\
**Post date:** [January 4, 2016, 7:15pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/18 "2016-01-04T19:15:42Z")

</div>

Thanks for the info and the bug report number.

---

<div class="post-metadata">

**Author:** ![Bionic\_Ape](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bionic_ape/32/1090124_2.png) [@Bionic\_Ape](https://forums.unrealengine.com/u/Bionic_Ape)\
**Post date:** [February 4, 2017, 1:14pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/19 "2017-02-04T13:14:29Z")

</div>

I have seen that the issue UE-13304 is already solved but I still have a similar issue.

Specially with UTimelineComponent and the UFUNCTIONS that I bind.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [February 6, 2017, 2:46pm UTC](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079/20 "2017-02-06T14:46:28Z")

</div>

Hey Bullyproof-

Since UE-13304 is already resolved, it’s likely that your issue is something different. It would be best to create a new post with as much information and details as possible to help us investigate your issue separately.

[Next page](https://forums.unrealengine.com/t/changing-values-in-base-class-c-does-not-propagate-to-child-blueprint/313079.md?page=2)
