void OnUndo() { // We have to rescan patches and nodes, // because there may be an unknown ones. _patchManager.Reset(); if (_patch != null && _patch.isValid) { _patch.Rescan(); } // Manually update the GUI. Repaint(); }
// Reset the internal state. void ResetState() { _patchManager.Reset(); if (_patch == null || !_patch.isValid) { _patch = _patchManager.RetrieveLastSelected(); } else { _patch.Rescan(); } _mainViewSize = Vector2.one * 300; // minimum view size Repaint(); }