예제 #1
0
        public void RemoveGizmosListener(Action callback)
        {
            RemoveListener(callback);
            SceneEventListenerBehaviour listenerGameObject = m_listenerGameObject;

            listenerGameObject.onDrawGizmos = (Action)Delegate.Remove(listenerGameObject.onDrawGizmos, callback);
        }
예제 #2
0
        public void RemoveUpdateListener(Action callback)
        {
            RemoveListener(callback);
            SceneEventListenerBehaviour listenerGameObject = m_listenerGameObject;

            listenerGameObject.onUpdate = (Action)Delegate.Remove(listenerGameObject.onUpdate, callback);
        }
예제 #3
0
        public void AddGizmosListener(Action callback)
        {
            AddListener(callback);
            SceneEventListenerBehaviour listenerGameObject = m_listenerGameObject;

            listenerGameObject.onDrawGizmos = (Action)Delegate.Combine(listenerGameObject.onDrawGizmos, callback);
        }
예제 #4
0
        public void AddUpdateListener(Action callback)
        {
            AddListener(callback);
            SceneEventListenerBehaviour listenerGameObject = m_listenerGameObject;

            listenerGameObject.onUpdate = (Action)Delegate.Combine(listenerGameObject.onUpdate, callback);
        }
예제 #5
0
 private void AddListener(Action callback)
 {
     //IL_0020: Unknown result type (might be due to invalid IL or missing references)
     m_callbacks.Add(callback);
     if (m_callbacks.Count == 1)
     {
         m_listenerGameObject = new GameObject("SceneEventListener").AddComponent <SceneEventListenerBehaviour>();
         Object.DontDestroyOnLoad(m_listenerGameObject.get_gameObject());
     }
 }