public void pushOK() { if (InputText.text != "") { HighScoreClass buffer = new HighScoreClass(PlayerController.time, InputText.text, PlayerController.kills); HighScoreArrayList.LoadScoresToList(); HighScoreArrayList.list.Add(buffer); HighScoreArrayList.list.Sort(new HighScoreClassComparer()); if (HighScoreArrayList.list.Capacity > 10) { HighScoreArrayList.list.RemoveAt(10); } HighScoreArrayList.UploadFileFromList(); //SceneManager.UnloadSceneAsync("SceneForest_lvl_1"); SceneManager.LoadScene("MainMenu"); } }