Given a TMap where the value type is an instanced object: when a child blueprint is saved with modifications to the TMap, and then additional TMap are added to the parent blueprint and the child blueprint reloaded, the new key-value pairs appear in the child blueprint as shallow copies of the instanced object. Making modifications to the child's instanced object also affects the parent's values.

Steps to Reproduce

Repro steps:

  • Make an actor class that has the following TMap of instanced objects:
    UPROPERTY(EditAnywhere, AdvancedDisplay, Instanced, Category = AssetUserData)
    TMap<int32, TObjectPtr<UAssetUserData>> MyMap; 
  • Create a blueprint BP_Parent and populate it with an entry: [1 = instance of AssetGuideline with GuidelineName = "OriginalValue1". Compile and save the blueprint.
  • Create a child blueprint BP_Child and change the value of GuidelineName to "ChangedValue1". This means the child blueprint now has a modified value for MyMap. Compile and save the child.
  • Add another entry to BP_Parent: 2 = instance of AssetGuideline with GuidelineName = "OriginalValue2". Compile and save.
  • Notice that in BP_Child, the new entry doesn't appear to have propagated from parent to child. This is another bug: [Link Removed]
  • Right click BP_Child in content browser and reload the asset. Notice that the entry now is propagated from parent to child.
  • Now in BP_Child change entry [2]'s GuidelineName to "ChangedValue2".
    Result: In BP_Parent entry [2]'s value has also changed to "ChangedValue2". This implies the child was loaded with a shallow copy of the instanced object in the map.
    Expected: BP_Parent's data should be unaffected by the BP_Child's data change.

Additional info: Interestingly even after restarting the editor the parent and child blueprints point to the same instanced object.

Have Comments or More Details?

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

Login to Vote

Cannot Reproduce
ComponentUE - Gameplay - Blueprint
Affects Versions5.2
Target Fix5.4
CreatedJul 25, 2023
ResolvedDec 20, 2023
UpdatedApr 19, 2024
View Jira Issue