public static void Unregister(UnityBehaviour b) { Assert.IsTrue(_instance != null, "UnityWrapper instance is null!"); Assert.IsTrue(_instance._registeredBehaviours.Contains(b), "Behaviour is already registered with the UnityWrapper!"); _instance._registeredBehaviours.Remove(b); }
public static void Register(UnityBehaviour b) { Assert.IsTrue(_instance != null, "UnityWrapper instance is null!"); Assert.IsTrue(!_instance._registeredBehaviours.Contains(b), "Behaviour is already registered with the UnityWrapper!"); _instance._registeredBehaviours.Add(b); _instance._registeredBehaviours.Sort((b1, b2) => b1.Priority.CompareTo(b2.Priority)); }