Compiling Child Blueprint and editing child component's class value, results in parent component's value being changed under certain compile conditions.


"This is because they're now pointing to the same object.
The reason appears to be that in the compile step, to build the child,

  • It gets assigned the parent spring arm component
  • A reference replacement map is built to convert that parent one to a new child spring arm component.
  • Then we call UEditorEngine::NotifyToolsOfObjectReplacement
  • That calls FPropertyEditorModule::ReplaceViewedObjects
  • That goes to ALL Detail views, and replaces the objects with that map.
  • So now spring arm component on BP_BasePawn_Parent is pointing to the NEW spring arm component on BP_BasePawn_Child

Note: The bug does not manifest if you only have one object open at a time in the Blueprint Editor, but that's not a typical workflow. It seems like the ReplaceViewedObjects should be more restrictive in which details views it updates, but I don't know what other repercussions there would be."



Steps to Reproduce
  1. Create a Blank Blueprint Project
  2. Create a Blueprint Pawn Class "BP_BasePawn"
  3. Create a child Blueprint based of BP_BasePawn "BP_BasePawn_Parent"
  4. Create a child Blueprint based of BP_BasePawn_Parent  "BP_BasePawn_Child"
  5. Attach a Spring Arm component to BP_BasePawn in Blueprint.
  6. Save All and close the Editor.
  7. Re-launch the editor-> Open both the BP_BasePawn_Parent and BP_BasePawn_Child blueprints in "Full Blueprint Editor".
  8. On BP_BasePawn_Parent, open the details panel so you can see the value of SpringArmComponent->TargetOffset.Z. (Leave open on a separate monitor/window if possible)
  9. Compile BP_BasePawn_Child
  10. Change the property value on BP_BasePawn_Child->SpringArmComponent->TargetOffSet.Z to any non-zero value.
  11. Look at the same value on BP_BasePawn_Parent. 


Result: The value of BP_BasePawn_Parent has changed.

Expected: The value of BP_BasePawn_Parent would remain unchanged.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-76835 in the post.

Login to Vote

Affects Versions4.214.224.23
Target Fix4.23
Fix Commit7253752
Main Commit7253762
Release Commit7253752
CreatedJul 2, 2019
ResolvedJul 9, 2019
UpdatedFeb 12, 2020