The update of c++ is not in sync with blueprint

Hi, guys!I wonder whether you had the same question like me.
In brief, I write a c++ class, and then in its constructor, I create some component and set some properties, and next I create a blueprint that derived from this c++ template. So far everything works well! But if I update constructor in c++, the blueprint seems don’t react immediately. In other words, If I adjust some properties in c++, the same properties in blueprint still unchanged. Is this a bug? or there is something wrong with my way.

The reason why this is happening is probably CDO (Class Default Object) is not updating on hot reload. For each class when engine starts and code modules are loaded and classes are registered, the object is created in intact form, creation of this objects executes constructor and sets de default, as result object with default varbales is created called CDO inside the UClass of that class. When you change constructor engine needs to reinitiate the CDO for defaults in blueprint to update, so there something is not right with hot reload.

Now i would count this as bug, even thru it might be lack of implementation and hot reload is known to be not perfect and sometimes mess up UE4 reflection system it always good to patch it up, so i will move this to bug raport. But you need to exactly explain how to reproduce it step by step, and explain exacly when defaults got back to normal if it happens at all, what triggers it.

Also blueprints don’t come from “c++ template” they are same valid classes as C++ class, what how engine seen it if you look up in to Class Viewer. Blueprints also get CDO created.

Hey cave_zf_586-

As mentioned, having the exact steps/code you’re using would be helpful. What properties/values are you seeing not update? Are you changing the default value in code that isn’t updating or adding a new property that isn’t appearing in the blueprint? Please provide exact context about what you’re seeing to help us investigate the issue.

Hi . I do apologize for my rough discription. It’s now let me reproduce it step by step.

My ue4 is from source compiled manually. And every time I launch my editor from the ue4 project in the vs2015, and create the new ue4 project based from template of c++ blank, after that the launch process closed, and a new vs project start automatically, and then I compile it for startup. In order to compile my project handily from vs during the editor runtime. I aways start ue4 editor via engine project(ue4 project) , not the project created newly. (Although ue4 can hot recompile c++ code in editor. But for my case, it does not work in a perfect way. Since when I receive the error messages from compiling, these messages are all gibberish in the output window. It’s not convenient for using this feature)


The pawn shown in image was made up by several component which showed in the next image.

133722-2017-04-11_12h47_45.png

133723-2017-04-11_12h48_05.png

And next let me adjust the property value of TargetArmLength from constructor. From default 200 to 700.

MyArmComp ->TargetArmLength = 700;

after that, If I open the blueprint for checking. The property with the same value will be found.

133724-2017-04-11_12h59_54.png

So far everything was done as I wish.
But If I adjust another property. just like this one.

MySkeletonMeshComp ->SetRelativeScale3D(FVector(0.6, 0.6, 0.6));

MySkeletonMeshComp is a object of USkeletalMeshComponent. I adjust this value from (0.3, 0.3, 0.3) to (0.6, 0.6, 0.6).

133725-2017-04-11_13h10_03.png

As you can see, it’s still unchanged in blueprint. But I notice there is a small yellow arrow on the right of property. If I click it, the property value will set to the value I just adjusted. Maybe it’s not a bug. But its performance is not as same as I imagine.

By the way, On the AnswerHub, It seems there’s no way to find the questions I posted via my account, and also there’s no tip for me when my question be repied or answered. So that I must type my entire account name in the search widget of top right corner for checking.
(maybe it’s a good way for searching, but it can’t give me any tip about whether the questions were replied or not)

Hey , please look up the description what I replied to . Maybe you could give me some excellent suggestions for manipulating ue4 correctly. Thank you very much for your attention!

Hey cave_zf_586-

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here Unreal Engine Issues and Bug Tracker (UE-43856) . You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers

Close unreal → Delete the “Binaries” folder in the source directory → Recompile upon opening the project → Should be good now