Typing in a Textfield Crashes on the iPad

My app’s text field crashes on the iPad. When the field is focused and the iOS virtual keyboard appears, as soon as you hit the first letter the app instantly shuts down to the desktop with no error message or anything. This is only a problem on the iPad; it works fine in the editor and Windows/Mac desktop builds. Here is a minimized sample of the relevant code:

static public string levelName=""; //global
void OnGUI(){
	//Layout settings, areas
	levelName=GUI.TextField(new Rect(50,50,500,50),levelName,32);
	//Button logic, etc.

Does anything jump out at you? If not, what’s the best way to go about debugging the problem since it only happens on the iPad?


any reason why your string is static ?