예제 #1
0
 private void OnEnable()
 {
     _script                 = (EventAsset)target;
     _staticFirst            = serializedObject.FindProperty("_staticFirst");
     _persistentListeners    = serializedObject.FindProperty("_persistentListeners");
     Undo.undoRedoPerformed += OnUndo;
 }
예제 #2
0
 private void OnDisable()
 {
     if (_cachedAsset)
     {
         UnRegisterEvent();
         _cachedAsset = null;
     }
 }
예제 #3
0
 private void OnEnable()
 {
     if (_eventAsset)
     {
         RegisterEvent();
         _cachedAsset = _eventAsset;
     }
 }
예제 #4
0
 private void RegisterType <T>(EventAsset asset, ValueEvent <T> .StaticCallback handler)
 {
     ((ValueEvent <T>)asset).Register(handler);
 }