DKinnison
DKinnison

Reputation: 365

Unity3d, when I touch an InputField, the keyboard doesn't show

un opened keyboardWhen I tap on an inputfield on android device, i get a little text area and an ok button. But I have to touch the input field to get the keyboard to pop up.

Any ideas?

All I'm doing code wise is:

if (!wasFocused && TouchScreenKeyboard.visible && createAccountPanel.activeSelf)
    {
        wasFocused = true;
        btnMat.color = validC;
    }else if (wasFocused && !TouchScreenKeyboard.visible && createAccountPanel.activeSelf) {
        wasFocused = false;
        btnMat.color = invalidC;
        //messageMNG.CreateMessage("Checking name: " + usernameChangeInput.text, true);
        dbMNG.CheckName(usernamePreview.text);
    }

When I do a check, it says that touchscreenkeyboard is visible.

**EDIT I just created a new scene and added an input field and a text mesh pro input field and I get the exact same thing.

Empty scene still broken keyboard

Upvotes: 4

Views: 6015

Answers (2)

Ashwin
Ashwin

Reputation: 7637

The keyboard does not pop up if you are running the app on Unity Remote app. Keyboard will automatically show up once you build and run your unity app on device.

Upvotes: 3

Eric Marley
Eric Marley

Reputation: 1

I was having a similar problem today, but found the reason no keyboard was showing was due to building and launching onto a locked phone. When I made sure the phone was unlocked when I clicked the input, the keyboard showed up below that box/ok portion.

Upvotes: 0

Related Questions