Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - niniane

Pages: [1]
1
ArenMook, I tested the fix you quoted (with "mWaitForKeyboard"), and that works for me also.  Thank you for including this fix in future versions of NGUI. 

Keep up the great updates!

2
No, even though NGUI exits Update() after opening the keyboard, the problem happens on the next iteration through Update(). 

On the second iteration through Update(), mKeyboard.active is still false, so the code I quoted above (~line 633) sets mKeyboard to null.

I put in a fix by adding a boolean variable "mKeyboardStarting" and adding another check to line 633:
        if (!mKeyboardStarting && (mKeyboard.done || !mKeyboard.active))

You also then need to add:
        if (mKeyboardStarting && mKeyboard.active) {
          mKeyboardStarting = false;
        }

I verified that this fixes the problem.

I just updated yesterday to NGUI v3.6.5.  This bug was reproducible in v3.6.5 until I put in the fix I wrote above. 

Would you incorporate this fix so that we can upgrade to future versions of NGUI without having to keep putting in this fix? Thank you.

3
I've been debugging this, and it may be a race condition in UIInput.Update().  Around line 589, the code creates a new keyboard:

          mKeyboard = (inputType == InputType.Password) ?
            TouchScreenKeyboard.Open(val, kt, false, false, true) :
            TouchScreenKeyboard.Open(val, kt, !inputShouldBeHidden && inputType == InputType.AutoCorrect,
              label.multiLine && !hideInput, false, false, defaultText);

But when it gets to line ~633, mKeyboard.active is still false (because the keyboard didn't have time to fully initialize yet).

        if (mKeyboard.done || !mKeyboard.active)
        {
          if (!mKeyboard.wasCanceled) Submit();
          mKeyboard = null;
          isSelected = false;
          mCached = "";
        }

So this code sets mKeyboard = null.  The iPhone still opens the keyboard, but by the time it's open, it's unattached to the mKeyboard variable in UIInput.  So all of my keypresses get ignored because mKeyboard has been set to null, and isSelected has been set to false.

I attached a screenshot of my UIInput settings.  No validation, no hidden inputs.

4
I am using an UIInput on an iPhone application.  At least 5% of the time, when the keyboard comes up, my edits fail to propagate to the label.  Repro steps:

1. I created a sprite with UIInput, with a child Label.
2. I ran this on iPhone.  I press the sprite to bring up the mobile keyboard.
3. I change the text from "A" to "B".  I see that the label changed to "B".
4. I press "Done".
5. Repeat steps 3 and 4, changing "B" to "C", press Done, then "C" to "D", press Done, etc. 

Within 5 to 20 iterations, I will hit a case where the label won't change, no matter what I type on the keyboard.  If the label says "N", it will say "N" no matter what I type in the keyboard.  If I type "O", the keyboard preview would say "O", but the label still says "N".  After I hit "Done", the label still reads "N" as though I had not edited it.

I have never gotten through the alphabet without encountering the bug at least once. 

I created an entirely new test project with just the UIInput sprite, and this still happens. 

I am using NGUI 3.6.5, but this also happened with 3.5.9.  Would you please look into what's causing this?  We have been trying to debug it ourselves for days, and it's blocking us from giving our mobile application to testers.  Thank you.

5
NGUI 3 Support / UIInput on mobile does not fire OnSubmit first time
« on: June 05, 2014, 08:31:18 PM »
I'm using an UIInput NGUI widget on iPhone.  The first time I press my button, edit the text using TouchScreenKeyboard, and press "Done", there is no "OnSubmit" fired.  When I open the edit box again, the text has reverted back to its original values.

The second and subsequent times that I press the button and edit the text, I do get "OnSubmit" fired, and my text changes stay applied.  Is this a known issue?

How can I get the OnSubmit to fire the first time also?

6
NGUI 3 Support / UI2DSprite shows up in editor but not iPhone
« on: May 16, 2014, 04:22:57 PM »
I created a UI2DSprite.  It shows up fine in the editor but is not visible when i export the app and run it on my iPhone.

I also tried to Add Component -> UI2DSprite on an existing button.  Again, this shows up fine in the editor and I can click the button and see the effect.  But the button is invisible on my iPhone.  I can still push the button, but the sprite does not show up.

Does the sprite need to get copied into the Resource folder?  i generated the sprite by going to Window -> Sprite Packer, and pressed "pack".

What's going wrong?  I'm using NGUI v3.5.9 with Unity v4.3.4f1.  Thank you!

7
I have a multi-line UIInput on iOS.  Tapping it brings up the mobile keyboard, with a 3-line white text-preview area above it. I would like to make the 3-line text-preview take up the rest of the screen. That way, the user can't accidentally press outside the text area and close the mobile keyboard. I also want the user to be able to preview more text and not have to scroll back and forth if they're writing 10+ lines of text.

How can I do this?

Thank you!

Pages: [1]