- Home /
iPhone Text Box Not Working
Ok so im trying to make a textbox that you can put text in (duh) but the problem is the text will only stay for not even a second and dissapear. Here is my code.
private var keyboard : iPhoneKeyboard;
function OnGUI() {
username = GUI.TextArea(Rect(600,300,200,50),"",200);
if(keyboard) {
username = keyboard.text;
}
if (GUI.Button (Rect (600,160,120,120), "Submit Score")) {
postScore(username,blackHole.MyScoreCounter);
}
}
I am using the unity wiki site to create a highscore for my game and i just want to use a textbox to use for the username.
Answer by tyman35 · Jul 16, 2011 at 08:27 PM
Never Mind solved all i had to do was put my username var in here
username = GUI.TextArea(Rect(600,300,200,50),username,200)
Your answer

Follow this Question
Related Questions
TextArea/TextField on iPhone has no "Done" button. 0 Answers
iPhoneKeyboard.area works? 2 Answers
TouchScreenKeyboard not working with GUI.TextArea (tested with Android tablet) 0 Answers
iphone keyboard string length 0 Answers
Remove "Preview text line" above keyboard input text on Android and iPhone 1 Answer