When the value of a variable defined in a parent class is changed inside of the child class, the value is not updated in a BP of the child after hot reloading.
1. Open UE4 Editor (any project)
2. Add code to project based on Actor (ParentClass)
3. Add the following code to the header file:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) int32 MyNumber;
4. Add the following line of code to the constructor in the source file:
MyNumber = 45;
5. Compile
6. In the editor, add code to project based on ParentClass (ChildClass)
7. In the ChildClass constructor change the value of MyNumber from 45 to 22
8. Compile
9. Create a blueprint of ChildClass (ChildBP - note that the value of MyNumber is 22 in the blueprint)
10. In ChildClass change value of MyNumber from 22 to 8
11. Compile with the editor open
Result:
MyNumber still shows the value of 22
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.7.1 |
Target Fix | 4.8 |
Created | Mar 4, 2015 |
---|---|
Resolved | Apr 21, 2015 |
Updated | Apr 22, 2021 |