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