When creating an Actor Blueprint (Testbase), and creating a new Blueprint Actor that inherits from Testbase (TestBP).  We can drag an instance of TestBP into the World. If we go back into the Parent Actor Blueprint (Testbase), and add a Float Variable("Good"), Compile and assign it a default value. Next, we add functionality to print that variable into a string (using Print String Node.)  this will result in Test BP accurately printing the default value to the screen.  However, upon going back into the Parent Actor Blueprint(Testbase) and duplicating the previous Float Variable ("Good").  This new duplicate("Bad")  will print the incorrect inherited default value from TestBP.

Steps to Reproduce
  1. Open Unreal Editor 4.20->Create a blank Blueprint project
  2. Create a new Blueprint named "Bp_Testbase" based off of a StaticMeshActor.
  3. Inside of Bp_Testbase, assign a Cube Static Mesh for visual representation.
  4. Create a BP that is derived from Bp_Testbase and call it "Bp_Test".
  5. Drag an instance of Bp_Test into the World.
  6. Inside of Bp_Testbase, create a Float variable called "Good".
  7. Compile->Assign a default value of 999.0 to "Good"
  8. Inside the Event Graph of Bp_Testbase, Branch off of Event Tick, and call the Function "Print String".
  9. Create a Getter for the Float variable "Good", and cast it into the Print String Parameter in the Print String Function on the Event graph of Bp_Testbase-> Compile & Save.  
  10. Play in Editor-> Note the value should display 999.0-> Stop the Program.
  11. Navigate to your Bp_Testbase actor-> click on the Float variable "Good" and press Ctrl-W so that a duplicate is created.
  12. Rename this duplicate variable to "Bad"
  13. Note that this value is 999.0->Compile & Save.
  14. Inside of Bp_Testbase actor's event graph-> Create a Getter for the duplicate Float variable "Bad", and cast it into the Print String Parameter inside of the Print String Function node-> Compile & Save.
  15.  Play in Editor.


Result:  The Float value of "0.0" is printed.

Expected:  The Float value of "999.0" is printed.

Note: Changing the default value of Bad will always yield a "0.0" display result.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-65450 in the post.

Login to Vote

Affects Versions4.
CreatedOct 18, 2018
UpdatedFeb 26, 2020