public void WriteName() { //If the user has entered something in the input field, use it as new profile name and create the logging file for it if (NewProfileName.text != "") { if (NewProfileName.text.Length > 50) { ErrorMsg.text = "Profile name too long"; return; } if (LogInfo.CheckProfileHasInvalidChars(NewProfileName.text)) { ErrorMsg.text = "Invalid profile name"; return; } logInfo.CreatePlayerDir(NewProfileName.text); //Go to language selection scene UnityEngine.SceneManagement.SceneManager.LoadScene("dynamic_language_selection"); } }