public void ClickedSwitchButton()
 {
     if (preventAllClicks) return;
     if (isEditing) {
         if (!editorManager.HasPlayer()) return;
         // switching to game mode
         editorManager.DisableAllEditorUI();
         editorManager.gameObject.SetActive(false);
         gameManager.gameObject.SetActive(true);
         gameManager.Setup(editorManager.currentScene);
         toolPanelAnims.Play("closetools");
         btnText.text = "Back to editing";
     }
     else {
         // switching to edit mode
         gameManager.SwitchToEdit();
         editorManager.gameObject.SetActive(true);
         gameManager.gameObject.SetActive(false);
         toolPanelAnims.Play("opentools");
         btnText.text = "Play the level";
     }
     isEditing = !isEditing;
 }