Example #1
0
        /// <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);
        }
Example #2
0
 /// <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);
     }
 }