Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

TouchScreenKeyboard.hideInput changes in 2019.1

Discussion in 'Android' started by Tomas1856, Apr 23, 2019.


Does TouchScreenKeyboard.hideInput work correctly for you?

  1. Yes

  2. No

  1. Tomas1856


    Unity Technologies

    Sep 21, 2012

    in 2019.1 we applied fix/workaround for long standing issue with TouchScreenKeyboard.hideInput not working on Android.

    It should work now, please refer to documentation for more information

    Depending on issues found or not found, we'll consider backporting the fix to 2018 LTS version, so your feedback is very valuable.

    Thank you.
  2. Homicide


    Oct 11, 2012
    Well - the hideInput field seems to work well , the general flow of input Fields on android is still broken IMO. It seems a game pad is useless with the current state of Input Fields.

    I don't know whats going on here, but i followed this thread, and assumed that all input field issues would have been resolved by now, but it seems this is not so.

    I am trying to build to android , and migrate around the app using a gamepad, everything works great, except InputFields. They dont work at all. I have been able to force the Keyboard to open like this ...

    Code (CSharp):
    1.       InputField _inputField;
    2.         void Start()
    3.         {
    4.             _inputField = GetComponent<InputField>();
    5.         }
    7.         void Update()
    8.         {
    9.             if (Input.GetButtonDown("Submit"))
    10.             {
    11.                 TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, false, false);
    12.             }
    15.         }
    16.     }
    But, once the virtual keyboard opens, it can not be navigated with a controller at all. The controller is simply stuck between the (now hidden, mind you) text preview field , and the 'ok' button to submit the text. but it will not navigate to any actually buttons on the virtual keyboard. :(

    Really frustrating, as this prevents anyone from using my app, ultimately making it a collosal waste of time, as it requires login and room creations with unique names, etc. And specifically targets Android / SHIELD TV.

    Any ideas or pointers guys?
  3. Tomas1856


    Unity Technologies

    Sep 21, 2012
    The thread you posted seems to point out that issues related to touches were fixed in TouchScreenKeyboard, but your problem is with gamepad - which is totally different story? I actually haven't seen any bugs reported to TouchScreenKeyboard not working with gamepad - do you have a case number?
  4. Homicide


    Oct 11, 2012

    Appreciate the response Tomas. Cheers.

    I wish i could follow up on this with some relevant information, but this is not the case. I will leave you with an absurd story, believe it not...

    I custom created a virtual keyboard, as i was having no luck with the inputfield on androids at all. Its really not hard to create a on screen keyboard, so hey why not... but lo and behold, no sooner did i finish scripting it up and implemented it, the frig darn thing (stock android kb) started working... O.O

    It may have been a clean case of something corrupted in data, etc, i'm really not sure, as i have had a few issues with 2019.1, but so far, nothing that didn't seem to rectify itself after wiping the library or project settings.

    Anywho, you can safely delete my posts as they have no where to go now. Thanks for your time mate.
  5. planetfactory


    May 18, 2016

    related to the keyboard, I think there is a bug, but maybe it supposed to work this way....
    1.- When touching an InputField the TouchScreenKeyboard opens. (ok).
    2.- If the InputField is touched again, the keyboard closes (wrong, isn't it?)
    3.- If the InputField is touched again, the keyboard doesn't open (that's worst).
    4.- To open again the keyboard, an outside element has to be touched, and the touch the InputField again.

    I tried in different Unity versions (2018.4.18,2018.4.22, 2019.2.21, etc.).

    I can't be the only one with this issue, right? Anyone with a solution?


  6. waldgeist


    May 6, 2017
    We've just updated our app to 2020.1b16 and noticed that the input fields don't as expected anymore. You can type in one field, but as soon as you want to switch to another field, nothing happens.
  7. mikejm_


    Oct 9, 2021
    Hey Tomas, Unfortunately this appears to not currently be working. I have been testing on a Samsung S21 Android (which should be newest or near newest version of Android) and it is creating numerous catastrophic errors as described here:

    I appreciate your signature about bug reporting and I submitted a bug report. It looks like you might be the best person who would know what is going on with this.

    I would really appreciate a fix so I can keep working on my project smoothly.

    If this is not something you have time or resources for fixing, would you be willing to share any of the code you were using to hide the field so I can try to poke around myself and see if I can find an updated solution on my end?

    I very much need this working so appreciate any help or tips/suggestions towards finding an updated solution you can provide.