A TMap containing a struct with a UObject reference property (set to nullptr by default) does not serialize properly for an instance where the UObject reference is set on the instance, but the TMap has the same number of elements as the default TMap. If the UObject reference is null, or the TMap has more (or fewer) elements than the default TMap, the TMap will be serialized correctly.
In the repro above, the EventGraph compares the name of the instance in the level to the contents of TheString in the first element of the TMap. If the values are the same, the contents of TheString will be displayed in green. If they are different, the text will be red. This works as expected in the first three instances. In the fourth instance, the text that is displayed is the default contents of TheString instead of the actual contents set in TheString for that instance.
There appear to be four key requirements for this issue to occur:
If any of these four requirements are not met, the TMap appears to serialize fine.
RESULT:
The first three instances will show green text, and the fourth instance will show red text.
EXPECTED:
All four instances will show green text.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-62695 in the post.
2 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.19.2, 4.20.1, 4.21 |
Target Fix | 4.22 |
Created | Aug 8, 2018 |
---|---|
Resolved | Sep 5, 2018 |
Updated | Feb 12, 2019 |