Exemple #1
0
        void OnDisable()
        {
            if (_propertyEditor != null) {
                DestroyImmediate(_propertyEditor);
                _propertyEditor = null;
            }

            _patchManager = null;
            _nodeFactory = null;
            _patch = null;

            Undo.undoRedoPerformed -= OnUndo;
            EditorApplication.hierarchyWindowChanged -= OnHierarchyWindowChanged;
        }
Exemple #2
0
        void OnEnable()
        {
            _patchManager = new PatchManager();
            _nodeFactory = new NodeFactory();
            _mainViewSize = Vector2.one * 300; // minimum view size

            _patchManager.Reset();
            _patch = _patchManager.RetrieveLastSelected();

            Undo.undoRedoPerformed += OnUndo;
            EditorApplication.hierarchyWindowChanged += OnHierarchyWindowChanged;
        }