iPhoneKeyboard and GUITextures

Is there a way to have iPhoneKeyboard and a GUITexture play nice together? Right now, I have the keyboard opening for the user to enter their name to set up a profile. I have a static “Back” button for the user to return to the previous screen at any time in the process, but due to iPhoneKeyboard taking control, I can’t touch the button anymore. It seems that any touches outside the keyboard area do not even register, because I tried to specify the exact location instead of using a HitTest on the GUITexture. Does anything work so I can use either one? Would a raycast from the camera work?

bump

Anyone have a solution for this?

http://stackoverflow.com/questions/741185/easy-way-to-dismiss-keyboard

This above link is slightly relevant but wont help you.

Basically, once the keyboard is in focus, this is because an input was clicked, you need to stop the input from being first responder.

When Unity3D pops up the keyboard, there is a text input with a (x) on it, the (x) dismisses the keyboard.

What you’re looking for is unsetting the input from being the first responder, it would depend if Unity3D actually implements this.

Else you’ll need to be at the Objective-C side of things, ie the code behind Unity iOS…

Perhaps try → Unity - Scripting API: GUI.UnfocusWindow ???

Is this really an issue for you though? When the keyboard pops up to edit text, there is a (x) button anyway?

Well, I didn’t want to have the user dismiss the keyboard just to push a button. We’re going to change up the GUI anyway, so it’s not going to matter anymore. FocusWindow doesn’t work in this scenario, since iPhoneKeyboard isn’t in Unity. I would have to do it in Objective-C, it looks like. Just a question though… if your link “won’t help,” then how exactly is it relevant? :stuck_out_tongue: