Sunday, July 3, 2022
HomeGame DevelopmentThe best way to disguise the TouchScreenKeyboard's enter area in Unity on...

The best way to disguise the TouchScreenKeyboard’s enter area in Unity on Android?


Unity for Android suggests that you would be able to disguise the TouchScreenKeyboard’s enter area with the command TouchScreenKeyboard.hideInput. Superficially this seems like it really works, however it has quite a few issues detailed right here and right here

Unity says they’re simply hiding the enter area, and it ought to now not be interactive whereas hidden. However this does not work. Primarily, underlining from autocorrect recommendations nonetheless reveals up. Even worse, clicking wherever within the space of the hidden enter area causes a cascade of errors that crashes the keyboard and closes it.

For example, right here was a easy demo challenge I made exhibiting the enter area we try to do away with:

enter image description here

Here’s what it seems like with the enter area hidden by Unity:

enter image description here

There are two issues with the hiding. First, the blue horizontal line is an underline of an autocorrect suggestion which shouldn’t be seen. Second, clicking wherever within the crimson field space (crimson field was added to picture for illustration) crashes the keyboard with errors.

I submitted a bug report back to Unity however as this has been ongoing not less than 3 years from what I see on the discussion board and I want it mounted, I want to strive trying into it as properly.

I’ve seen and used codes to measure the Android keyboard top and manipulate the colours and visibility of the Android standing bars and navigation bars. Nevertheless, I’ve not been capable of finding any examples of code that accesses or manipulates this TouchScreenKeyboard enter area.

ie. Should you run TouchScreenKeyboard keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default); what could be some Android code you possibly can run in Unity that may manipulate the ensuing enter area connected to the opened keyboard?

Maybe the very best answer could be to easily transfer it a number of thousand pixels off display so it’s innocent. In any other case it should be set to disregard clicks made in its area and the autocorrect strains want hiding.

Any concepts for what Android code controls this enter area or the way it might be manipulated from Unity? Thanks.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments