/// <summary> /// This method can be called to redo the action. /// </summary> public void Redo() { EditorGizmoSystem gizmoSystem = EditorGizmoSystem.Instance; gizmoSystem.TransformPivotPoint = _newPivotPoint; TransformPivotPointChangedMessage.SendToInterestedListeners(_oldPivotPoint, _newPivotPoint); }
/// <summary> /// Executes the action. /// </summary> public void Execute() { // If the pivot points differ, execute the action if (_oldPivotPoint != _newPivotPoint) { EditorGizmoSystem gizmoSystem = EditorGizmoSystem.Instance; gizmoSystem.TransformPivotPoint = _newPivotPoint; TransformPivotPointChangedMessage.SendToInterestedListeners(_oldPivotPoint, _newPivotPoint); EditorUndoRedoSystem.Instance.RegisterAction(this); } }