private void DetectUndoInput()
 {
     if (Input.GetKeyDown(_undoCommandKey))
     {
         // undo previous action
         _commandStack.UndoLastCommand();
     }
 }