using UnityEngine; using System.Collections; using System.Collections.Generic; public class MultiKeyDictionary : Dictionary> { new public Dictionary this[T1 key] { get { if (!ContainsKey(key)) Add(key, new Dictionary()); Dictionary returnObj; TryGetValue(key, out returnObj); return returnObj; } } public bool ContainsKey(T1 key1, T2 key2) { Dictionary returnObj; TryGetValue(key1, out returnObj); if (returnObj == null) return false; return returnObj.ContainsKey(key2); } }