Support => NGUI 3 Support => Topic started by: Thales Velasco on October 29, 2013, 08:45:46 AM
Title: UIInput problem in Android
Post by: Thales Velasco on October 29, 2013, 08:45:46 AM
I've been using Ngui for a while now. Recently I'm having a problem with the UIInput, and need some help.
I have 2 UIInputs at my Scene, same Anchor and Panel. When I Play it at the Unity Editor, i works as usual, but when I 'Buid and Run' it at my Android device, I select the UIInput, and the virtual keyboard apears, I enter the text and it goes to both of the Inputs on the Scene. If I select the second, It already has the text, and if I delete it, the first input text is deleted too. I tryed to put one in another anchor, and panel, but it continue the same. I even added a third UIInput, to check if this happens because one was a copy of the other, but it has been linked also, and the same text apears.
I have used UIInput this very same way in the past, with the previous version of Ngui, but I've never had this problem before, it seems to be a new version problem. Hope you can help me. Tnx in advance;
Title: Re: UIInput problem in Android
Post by: jnbt on October 29, 2013, 10:36:25 AM
Same problem here on iOS. Every input's value is changes when entering stuff with the "virtual" keyboard.
Title: Re: UIInput problem in Android
Post by: jnbt on October 29, 2013, 10:55:09 AM
Just found the problem in UIInput.cs, Line 139.
To solve this issue change:
staticprotected TouchScreenKeyboard mKeyboard;
to
protected TouchScreenKeyboard mKeyboard;
I think this is a regression bug, as before 3.0.3 mKeyboard also wasn't static
Title: Re: UIInput problem in Android
Post by: Thales Velasco on October 29, 2013, 11:22:14 AM
Worked here! Thank you very much!
Title: Re: UIInput problem in Android
Post by: ArenMook on October 29, 2013, 04:24:33 PM
There was a missing "isSelected" check in one place, but it should be all there in 3.0.3e, so removing the static flag shouldn't be necessary. Only one keyboard can be up at a time, so I see no reason to not have it be static.