private static void Remove(SimbaComponent component) { var type = component.GetType(); if (TypeToInstance.ContainsKey(type)) { TypeToInstance.Remove(type); } else { throw new ApplicationException($"{component} was not cached"); } }
private static void Add(SimbaComponent component) { var type = component.GetType(); if (TypeToInstance.ContainsKey(type)) { Debug.LogError($"{type} was already instantiated somewhere"); } else { TypeToInstance.Add(type, component); } }