Duplicate key checking in maps and sets in the editor is done via calls to FScriptMapHelper::HasKey() and FScriptSetHelper::HasElement(), but this code is checking for object names which are subsets of existing keys, and so incorrectly reports duplicate keys when adding such a new key.
This is fundamentally an editor issue rather than a Core issue. These two functions are inappropriate for these helpers and should be relocated to the editor as part of any fix.
UCLASS() class AMyActor : public AActor { GENERATED_BODY() }; UCLASS() class AMyActor2 : public AActor { GENERATED_BODY() }; UCLASS() class AMyActorReference : public AActor { GENERATED_BODY() UPROPERTY(EditAnywhere, Category = "TestMap") TMap<UObject*, int32> TestMap; };
Expected: Setting the key works.
Actual: A 'duplicate key' error is raised.
I am not able to find world outliner how to enable it?
How to achieve HLSL Multiple Render Target in Material blueprints?
Hey, why do i get this when i snap two similar meshes together?
How does TextureRenderTarget2D get TArray<uint8> type data?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How can i modify the param name in EQS node
What method is used to fill polygonal regions when drawing spline mesh at run time?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-140406 in the post.
1 |
Component | UE - Editor - Workflow Systems |
---|---|
Affects Versions | 4.27, 5.0 |
Created | Jan 27, 2022 |
---|---|
Updated | Jan 19, 2024 |