im trying to convert GUI.tooltip to a int
GUI.Button(new Rect(50, Screen.height - 80, 80, 30), new GUIContent("Unit 1", "0"));
GUI.Button(new Rect(140,Screen.height - 80, 80, 30), new GUIContent("Unit 2", "1"));
GUI.Button(new Rect(230,Screen.height - 80, 80, 30), new GUIContent("Unit 3", "2"));
GUI.Button(new Rect(320,Screen.height - 80, 80, 30), new GUIContent("Unit 4", "3"));
selectedUnit = System.Int32.Parse(GUI.tooltip); //dosent work
Debug.Log(selectedUnit);
Debug.Log(System.Int32.Parse("123")); // this work
gives this error: FormatException: Input string was not in the correct format
System.Int32.Parse (System.String s)
Playerr.OnGUI () (at Assets/Script/Playerr.cs:165)