Search Unity

Problem with keypad in TextField

Discussion in 'Android' started by Nyro, Aug 23, 2013.

  1. Nyro

    Nyro

    Joined:
    Aug 23, 2013
    Posts:
    21
    Hi, I'm new in new in Android development and my problem is that i want a GUI.TextField to open the numeric keyboard instead of the regular Keyboard.

    I'm creating an little APP that makes some calculations based on the variable the user provides.
    Here the user provides the value of the variable.
    Code (csharp):
    1. X1 = GUI.TextField (new Rect (370, 50, 50, 25), "" + X1, 25);
    The problem is that I want the numeric keyboard to pop-up on the screen, not the text keyboard. Beside being annoying to switch to the numeric keyboard every time I type the variables, people sometimes put "," instead of "." when they put numbers like "1.23" then Unity doesn't recognize it as a number and the final calculation ends up wrong.

    Sorry about my English, not my native language.