2
votes

I'm making a Unity3D IOS game and ara almost there. I have some forms the user can fill but in the top menu I also have an "Cancel" button. I want to be able to make the keyboard disappear when the user hits the cancel button but cant figure it out... I have tried this but with no luck:

private var keyboard : iPhoneKeyboard;
if(GUI.Button.....){
   keyboard.active = false;
}

Can somebody tell me what I'm doing wrong please... Thanks in advance :-)

1

1 Answers

0
votes

I don't know how iOS + Unity3D works.

In iOS, to get rid of the keyboard... one uses a method on the textfield that is using the keyboard like so: [myTextField resignFirstResponder];

Maybe a hint... see if the text field in question has something like that.