protected void SafeSet(T idx, uint key, D value) { if (!m_cachedDictDataSaved.ContainsKey(idx)) { m_cachedDictDataSaved[idx] = new SimpleNonSequentialList <D>(); } if (value == null) { m_cachedDictDataSaved[idx].Remove(key); } else { m_cachedDictDataSaved[idx][key] = value; } eventOnValueChanged?.Invoke(idx, key, value); }