I googled that for hours but still can’t find a solution.
I tried just using a TextField, which supposedly would make the keyboard pop up, but all I can do is just select the text in it. The keyboard does not appear.
Then I tried to make it appear by code, using a similar code to that on the documentation: Unity - Scripting API: TouchScreenKeyboard.Open
But still no results. Everything else works fine, but the keyboard won’t show up.
I’m using a Nexus 7 tablet, by the way. And this is my code:
var showKeyboardButton : GUITexture;
private var keyboard : TouchScreenKeyboard;
var textInput : String = "Some text here.";
function Update()
{
if (showKeyboardButton.GetScreenRect().Contains(touch.position) && touch.phase == TouchPhase.Began)
{
keyboard = TouchScreenKeyboard.Open(textInput,TouchScreenKeyboardType.Default);
}
if (keyboard)
{
textInput = keyboard.text;
}
}
What could be causing this?