/// <summary>
    /// This switches the scene to a main menuescreen after saving the data of the current games data
    /// </summary>
    public void BackToMainMenue()
    {
        spawner = GameManager.managerWasa.RespawnManage;
        spawner.SaveCurrentGameData();
        foreach (GameObject g in UiElemements)
        {
            g.SetActive(false);
        }
        List <string> loadedscenes = GameManager.managerWasa.Levels();

        //unload all scenes except game manager
        foreach (string s in loadedscenes)
        {
            GameManager.managerWasa.UnloadScene(s);
        }
        GameManager.managerWasa.Awake();// runs awake method for gamemanager again
        //load the mainmenuescene
        GameManager.managerWasa.LoadScene("MainMenue");
        GameManager.managerWasa.Audio.StartPlayingNewTrack("MainMenue");
    }
 /// <summary>
 /// Same as the above but instead we quit the application after saving all the required data.
 /// </summary>
 public void ExitAllpication()
 {
     spawner = GameManager.managerWasa.RespawnManage;
     spawner.SaveCurrentGameData();
     Application.Quit();
 }