1 using System.Collections.Generic;
4 namespace droid.Runtime.Utilities.ScriptableObjects.SerialisableDictionary {
6 public Dictionary<TK, TV>
_Dict;
7 [SerializeField] TK[] _keys;
9 [SerializeField] TV[] _values;
12 var c = this._keys.Length;
13 this._Dict =
new Dictionary<TK, TV>(c);
14 for (var i = 0; i < c; i++) {
15 this._Dict[this._keys[i]] = this._values[i];
23 var c = this._Dict.Count;
24 this._keys =
new TK[c];
25 this._values =
new TV[c];
27 using (var e = this._Dict.GetEnumerator()) {
28 while (e.MoveNext()) {
30 this._keys[i] = kvp.Key;
31 this._values[i] = kvp.Value;
38 var result =
new T {_Dict =
new Dictionary<TK, TV>()};
Dictionary< TK, TV > _Dict
void OnAfterDeserialize()