Hi Shovaen,
I attempted to reproduce this, but cannot. I must be doing it wrong. These were my steps:
- Create a new C++ project.
- Add a new class derived from AActor (BagTest).
- Add two FInstancedPropertyBag variables exposed as UPROPERTY(EditDefaultsOnly, Category = Test) (Bag1 and Bag2)
- Create a new Blueprint class inherited from BagTest.
- Add a property to Bag1.
- Note that UPropertyBag::GetOrCreateFromDescs() is called the moment I add a property here.
- Right-click Bag1 and Copy.
- Right-click on Bag2 and Paste.
- Note that Bag1 and Bag2 now have identical properties, but UPropertyBag::GetOrCreateFromDescs() is NOT called here.
- Click Compile and note that UPropertyBag::GetOrCreateFromDescs() is once again called, but there is no sign of an ID collision.
I inserted the debugging code snipped that you helpfully provided, and with a breakpoint set on the UE_LOG line, nothing ever got hit. Could you provide any more details about how your code is structured, or anything else you might have done that would recreate this issue?