public void SetContent(CellContent cc) { lock (this) { _contentDictionary.Remove(cc.cellData); //make sure sides are on correct side _contentDictionary.Add(cc.cellData, cc); _connections.Add(cc); } }
public void Remove(CellContentData d) { CellContent c = _contentDictionary[d]; if (c != null) { _connections.Remove(c); } if (!_contentDictionary.Remove(d)) { Debug.LogError("false"); } }