void Awake() { if (instance) { Debug.LogWarning("Another instance of debug items exists"); return; } instance = this; Item[] items = Resources.LoadAll <Item>("Inventory"); foreach (Item i in items) { m_ItemList.Add(i.id, i); } }
void AddDebugItem(DebugItem item) { if (Filters.Count == 0) { _dispatcher.InvokeAsync(() => DebugItems.Add(item)); } foreach (var(filter, result) in _filterManager.Filters) { if (filter.Eval(item)) { if (result == FilterResult.Include) { _dispatcher.InvokeAsync(() => DebugItems.Add(item)); } return; } } }