mopsicus / umi

Unity mobile input (UMI) plugin for Android and iOS, allows to use features of mobile native input fields
MIT License
398 stars 92 forks source link

Cannot interact with TMP_InputField when attaching the script Mobile Input Field #118

Closed khanhhp2002 closed 1 month ago

khanhhp2002 commented 1 month ago

Hi there,

Recently I used this library for better keyboard control in android and ios versions. It's pretty cool. I can easily control the input field so that it moves right above the phone's keyboard like what you did in the demo scene.

However, when I press the submit button on the keyboard, the keyboard does not close even though the content has been sent. I did a little research and found that MobileInputField.SetFocus(false) closed the keyboard itself.

So I inserted that script however my TMP_InputField is no longer interactive in builds version.

I checked my script with the demo script but the problem doesn't seem to be resolved.

So am I forgetting something or is there a way for me to close the open keyboard from TMP_InputField without using MobileInputField?

Screenshot 2024-10-23 185225

mopsicus commented 1 month ago

Hello, of course, when using the plugin on a mobile device you don't interact with TMP_InputField, all control is done through the plugin, so if you need to close the keyboard e.g. – call plugin methods.

khanhhp2002 commented 1 month ago

Hello, of course, when using the plugin on a mobile device you don't interact with TMP_InputField, all control is done through the plugin, so if you need to close the keyboard e.g. – call plugin methods.

Actually I found the problem last time. It seems that when I tried to use the new input system it somehow affected this package and made it not work properly. When I switch the input system back to both or the old version, everything seems to work fine again. Sorry for the late reply. Thanks and have a nice day.