Author Topic: NGUI 3.6.4 - WP8 - UIInput  (Read 9784 times)

Caio.Lib

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 2
  • Posts: 26
    • View Profile
NGUI 3.6.4 - WP8 - UIInput
« on: June 03, 2014, 09:27:28 AM »
Hi!

I'm having problem with UIInput in WP8 after updating NGUI.
UIInput OnChange is firing but UIInput.current.value is empty and when I type, nothing shows in the UIInput's label property.
It's working fine in Editor and was working fine before.

BTW: I updated NGUI. The Read Me name is ReadMe - 3.6.2 but in Editor's Help it shows NGUI Documentation (v.3.6.1) is that right?

Thank you!
« Last Edit: June 14, 2014, 05:42:15 PM by Caio.Lib »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #1 on: June 04, 2014, 12:38:53 AM »
Yes, I forgot to update the menu caption to 3.6.2.

UIInput.current.value is empty... are you using hidden input keyboard type? Is it working everywhere else?

Caio.Lib

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 2
  • Posts: 26
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #2 on: June 04, 2014, 10:30:52 AM »
I'm using Keyboard Type: default.
I just tested it on Android, Unity's Editor and WP8. Only WP8 has the issue.

Thank you

Caio.Lib

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 2
  • Posts: 26
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #3 on: June 04, 2014, 02:46:01 PM »
I noticed another issue, when changing Validation to None I can type and the letters appears but like '|' and I can't remove them.

*I'm using Unity 4.5.0f6

Thank you

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #4 on: June 05, 2014, 12:48:03 AM »
If the TouchScreenKeyboard.hideInput is true (keyboard type is set to "Hide Input") then the text will always contain an invisible "|" in it that you can never remove -- but only on the invisible keyboard's side. Since your keyboard is set to 'default', I see no reason why something like you are describing would happen. I certainly haven't heard of this issue before. There certainly is no special handling between WP8 and other mobile platforms inside UIInput.cs -- you can check the code. If it's only broken on WP8 and works everywhere else, I would strongly advise submitting a bug to Unity so that they have a look at it.

Also try creating a script yourself that simply calls
  1. TouchScreenKeyboard.Open("Some text", TouchScreenKeyboardType.Default, false, false, false, false, "");
...in its Start() function. See if it shows the same problem.

Caio.Lib

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 2
  • Posts: 26
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #5 on: June 05, 2014, 01:45:16 PM »
ArenMook thank you for you help,

What I realized is that TouchScreenKeyboard.hideInput in Unity 4.5 on Windows Phone is always True.
I reported the bug: http://fogbugz.unity3d.com/default.asp?612011_ed1ipc886qooun94
I tried some changes but I messed up the code:

UIInput - 583:
  1. #if !UNITY_WP8
  2.         if (TouchScreenKeyboard.hideInput)
  3. #else
  4.         if (keyboardType == KeyboardType.HiddenInput)
  5. #endif
  6.  

I replaced all others but it stopped working.  :-[
I'll wait for the fix from Unity, the animation is having issues on Windows Phone too.

Thank you


quantumfrog

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #6 on: June 05, 2014, 03:14:04 PM »
Hi,
i can confirm this bug.
We updated to unity 4.5 and the latest ngui and after that all the Inputs are broken on Windows phone and only get "|" when typing in any character.

There are also issues switching the Input field. The Input field focus is often added and removed in one click.

A quick fix in some way would be much appreachiated :X we have to release our game next week and would prefer to do it in 4.5.
« Last Edit: June 05, 2014, 03:25:47 PM by quantumfrog »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #7 on: June 06, 2014, 02:28:18 AM »
Sigh. Yet another bug in Unity's WP8 implementation I have to hack around...

3.6.3 is due tomorrow evening and I'll add the hack there.

quantumfrog

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #8 on: June 10, 2014, 07:30:55 AM »
Thanks for the bugfix.
But there is still the focus problem. The input field only keeps its focus every ~10th click. The other times the Caret blinks one time in the input and the focus is gone.

Im using the UIInput class of 3.5.7 now. That one works fine even on W8 Phone except there is no Caret.

latas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: NGUI 3.6.3b - WP8 - UIInput
« Reply #9 on: June 12, 2014, 12:02:53 PM »
I agree with that. The bug still reminds. You can verify this behavior when you touch on the UIInput controller. The | blinks once and the keyboard appears. You type, but nothing is written in the box. When you click enter there is nothing in the box.

Thank you.

latas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #10 on: June 12, 2014, 05:04:55 PM »
As I've checked, it looks when you touch the Input Controller, submit is fired. This makes the control works in a loop. When the "submit" ends you touch again to write something and it invokes submit again, and so on.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #11 on: June 13, 2014, 04:17:37 AM »
What causes it to fire? Why does it only break on WP8?

latas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #12 on: June 13, 2014, 03:01:33 PM »
I guess there is something different in the Unity touch manager for Windows Phone, that has some behavior different than in other platforms. If you don't have any method assigned to onClick onSubmit event, then when you touch the UIInput the cursor blinks during some milliseconds, and then back to the normal stage.

Thanks.
« Last Edit: June 14, 2014, 04:51:17 AM by latas »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #13 on: June 13, 2014, 10:03:19 PM »
Why does clicking on an input field trigger its submit? Why do you have an OnClick notification in there? Did you attach a button component to your input field? You should attack the button with the OnClick elsewhere -- like an actual button.

latas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: NGUI 3.6.2 - WP8 - UIInput
« Reply #14 on: June 14, 2014, 01:17:38 AM »
Sorry I didn't use the right words. I'm talking about onSubmit, not onClick. Have you tested? I think if you test it you will see very easy what happens.

Thanks.
« Last Edit: June 14, 2014, 01:23:07 AM by latas »