예제 #1
0
        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);
        }
예제 #2
0
        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));
        }