private void OnEnable() { Object[] splines = targets; allSplines = new BezierSpline[splines.Length]; for (int i = 0; i < splines.Length; i++) { BezierSpline spline = (BezierSpline)splines[i]; if (spline) { spline.Refresh(); } allSplines[i] = spline; } ActiveEditor = this; if (BezierUtils.QuickEditSplineMode) { Tools.hidden = true; EditorApplication.update -= SceneView.RepaintAll; EditorApplication.update += SceneView.RepaintAll; } Undo.undoRedoPerformed -= OnUndoRedo; Undo.undoRedoPerformed += OnUndoRedo; }
private void OnDisable() { ActiveEditor = null; Tools.hidden = false; Undo.undoRedoPerformed -= OnUndoRedo; EditorApplication.update -= SceneView.RepaintAll; }