I am working with the iPhoneKeyboard class to get user data input like name, pw, email.
Unfortunately it seems to store the input values harshly. So if I leave the menu and return, the password will already be entered.
If I try to force flush the input with iPhoneKeyboard.text = “” the app freezes ![]()
Maybe I am just not seeing my mistake, I am confused.
private var keyboard : iPhoneKeyboard;
function OnGUI () {
User1PWtemp = ""; // test to see if that helps (it didn't)
if (GUI.Button(Rect(40,80,240,40),"")) {
if (activeUser == 1) keyboard = iPhoneKeyboard.Open(User1PWtemp, iPhoneKeyboardType.Default,false,false,true);
inputField = 1;
}
if (keyboard) {
if (activeUser == 1) {
if (inputField == 0) User1 = keyboard.text;
if (inputField == 1) User1PWtemp = keyboard.text;
if (inputField == 2) User1PWtemp2 = keyboard.text;
if (inputField == 3) User1mail = keyboard.text;
}
}
}