Description
I have encountered an issue when attempting to use a nested UDictionary of the following type:
public UDictionary<string, UDictionary<string, Sprite>> posturesForType;
It seems that the inner UDictionary is being copied whenever a new entry to posturesForType
is added. After creating two entries, modifying either of the inner UDictionaries will modify both. Anything added to one is added to all dictionaries.
In this image, I have created two entries, and attempted to assign the first two fields of the "Civillian" Dict, and it's populated the "Proforce" Dict as well. Selecting one row will select both, and reordering would affect both.
It seems that each element is being added with a reference to the same UDictionary, rather than a copy of it. I expect this might have something to do with the default behavior of how Unity adds a new element with the +
button at the bottom, it seems to be re-using the last value. Might it be possible to force it to add with an empty value rather than a copy of the previous?