Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

New UI Text Entry?

Discussion in 'UGUI & TextMesh Pro' started by OFSailor, Oct 23, 2014.

  1. OFSailor

    OFSailor

    Joined:
    Jun 13, 2014
    Posts:
    11
    Hi all,
    Ive been following the new UI posts with great anticipation but I have yet to see anything that resembles a way for users to enter content in, say, a textbox. For our project, we need to provide an authentication mechanism of username and password before allowing the user to play.

    Is there a plan for text entry with the new UI? It would seem like a huge benefit to having some method of entering text, even if it is only the most basic form to start.

    Thank you!
     
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    InputField is what i think you're looking for.
     
    OFSailor likes this.
  3. OFSailor

    OFSailor

    Joined:
    Jun 13, 2014
    Posts:
    11
    Glorious! Thanks!!
     
  4. OFSailor

    OFSailor

    Joined:
    Jun 13, 2014
    Posts:
    11
    One other thing, hoe does the inputfield accept input from mobile devices? Does it automatically trigger the device screen keyboard?
     
  5. Aithoneku

    Aithoneku

    Joined:
    Dec 16, 2013
    Posts:
    67
    On Android, yes. Also as you write, it will fill the field. (Well, at least this was true in b18, I didn't check recent version, but I would check it's still there as it doesn't make sense otherwise). On iOS I have no idea, but I would guess so (however AFAIK in iOS input - generally - doesn't display written text as Android does, so you need to make sure that your field is visible (not covered by the keyboard)) (please note that information about iOS are from second hand, so they might be inaccurate or even completely false).
     
  6. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    All mobile devices will open the onscreen keyboard. android and IOS both have a input area above the keyboard that you can see what your typing. Windows phone 8 i think doesn't have the input area.
     
    Aithoneku likes this.
  7. Aithoneku

    Aithoneku

    Joined:
    Dec 16, 2013
    Posts:
    67
    I see, in that case my info was false. Thank you for clarification.