2D Toolkit Forum

2D Toolkit => Support => Topic started by: thiagodeserto on November 03, 2013, 11:50:55 am

Title: Windows Phone 8 Keyboard Issue
Post by: thiagodeserto on November 03, 2013, 11:50:55 am
Hi,

I found an issue that occurs only on Windows Phone 8 devices.
When I click on tk2dUITextInput item it does not receive typed chars on WP8.
The system works great on editor but does not on mobile.

The weird thing is, sometimes (5% or less) it works.
I tested on a new scene and with the provided samples.

Here a video to see exactly what is going on:
http://www.youtube.com/watch?v=_HLREw_3Qts

Unity Pro 4.2.1f
2D Toolkit 2.2.3

There is any workaround for this, I'm on a project rush here.
Title: Re: Windows Phone 8 Keyboard Issue
Post by: unikronsoftware on November 04, 2013, 01:00:24 pm
How bizarre. I'll investigate this.
Title: Re: Windows Phone 8 Keyboard Issue
Post by: thiagodeserto on November 05, 2013, 01:38:38 am
Thank you so much.
If you have any clue or workaround for this, please let me know.
:D
Title: Re: Windows Phone 8 Keyboard Issue
Post by: unikronsoftware on November 05, 2013, 04:20:24 pm
After investigating it, we found that it is due to Unity behaving differently on Windows Phone compared to other mobile platforms. You can patch in a fix by removing the bits in bold in tk2dUITextInput.cs


#if TOUCH_SCREEN_KEYBOARD
    private IEnumerator TouchScreenKeyboardLoop()
    {
        while (keyboard != null && !keyboard.done && keyboard.active)
        {
            Text = keyboard.text;
            yield return null;
        }



Let me know how it goes.
Title: Re: Windows Phone 8 Keyboard Issue
Post by: thiagodeserto on November 05, 2013, 09:33:27 pm
It worked pretty good.
Thank you so much for the fast reply.
 :D
Title: Re: Windows Phone 8 Keyboard Issue
Post by: kujo on February 05, 2014, 09:18:03 am
Hi,

I'm having the same problem on my game.

Can that bold part be removed for all platforms, or does it need to be a special case for Windows Phone?

Thanks
Title: Re: Windows Phone 8 Keyboard Issue
Post by: unikronsoftware on February 05, 2014, 09:56:50 am
Its a special case for Windows Phone. Thats the only platform that behaves in that way...
Title: Re: Windows Phone 8 Keyboard Issue
Post by: kujo on February 05, 2014, 10:16:01 am
thank you - works great!
Title: Re: Windows Phone 8 Keyboard Issue
Post by: Siddharth3322 on February 05, 2014, 12:30:09 pm
This thing also work for me.