Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Universal WSA 8.1 - Mobile Build - Virtual Keyboard appears but Input does not works

Discussion in 'Windows' started by sevensails, Jun 18, 2016.

  1. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I'm using a EDIT.

    Universal WSA 8.1 - Mobile Build - Virtual Keyboard appears, but Input does not works. I can type, but what I'm typing does not input into the Edit.

    It works on Desktop and WSA10 builds (Mobile/Desktop).

    Unity 5.4b21

    Any advice?
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    The fix for this bug will come out shortly.
     
  3. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Is there a workaround for this? Should I revert to a previous Beta Version?
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    The bug is limited to Windows Phone 8.1, other WSA SDKs work fine. If you can't wait for next beta, your options are:
    - use other, unaffected SDK/Device combination, like Universal 10 and Windows Phone 10
    - revert to earlier beta

    Update: fix is included in Beta 23 according records (it's still to be released).
     
    Last edited: Jun 20, 2016
  5. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    I was using Unity 5.3.2p4 and input in Universal 10 IL2CPP would cause the app to instantly crash before showing the virtual keyboard or allowing any keyboard input (surface pro 3).

    I've since updated to Unity 5.3.5p5, and now the exact same project built for Universal 10 IL2CPP doesn't crash and does show the virtual keyboard, but "does not" show any input at all... neither does it let the keyboard enter characters. nada. This is testing on Surface Pro 3, ... everything works fine on Desktop (both are Windows build 1511, 10586.420)

    any ideas?
     
  6. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    in case anyone else besides me is interested, I submitted a case here: 808700
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,478
    We'll look into it. Thanks.
     
  8. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    "I've tried with attached keyboard on the device, and switching it to 'tablet' mode and using the virtual keyboard"

    Can you clarify this?
    With keyboard attached to device the on screen keyboard should show up at all.
     
  9. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    these things (surface pro 3) have a detachable keyboard.. if you fold the keyboard back, the device prompts you to switch into 'tablet' mode, which if you do.. then the virtual keyboard will become active.
     
  10. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    ok now that I can debug, its' still not throwing any errors.. however,

    I found out that only certain 'virtual' keys are working such as the arrow keys and backspace.. interesting thing though is, I can switch the virtual keyboard to hand-writing mode, and it will allow me to write the letters I need by hand... which is surprising considering how terrible I can write with my finger on this thing.

    so... something does work, but not the normal keyboard, and only certain letters on the virtual keyboard. I don't think anyone really wants to use the hand-writing mode to write anything (I know I sure don't lol)
     
  11. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    Are you using keyboard with input fields in Unity or XAML?
    We've recently found issue with XAML fields, but fields inside Unity should work fine.
     
  12. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    these are input fields in Unity...

    the project does use Universal 10/ XAML; I'll try switching it to D3D, but I believe I already tried that.
     
  13. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    ok, when switched to D3D (and now I have remote debugging working), when I click in the input field I see the following:

     
  14. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    ok, I see something common... for both .NET and IL2CPP backend:

    * if the project is built for Universal 10 / XAML, I do not get any errors, but symptoms are like described earlier.. no keyboard, only certain keys work on virtual keyboard.. handwriting mode actually works.

    * if the project is built for Universal 10 / D3D, when I tap or click the input field, I get the exception thrown error shown above...


    I PM'd you with a download link to a cleaned up project...
     
    Last edited: Jun 28, 2016
  15. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    D3D does not supports Virtual Keyboard...
     
  16. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    Last edited: Jun 28, 2016
  17. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    If I'm unable to get Unity's UI system to work with virtual keyboard, i'ld end up having to make two builds, one for every other platform... and another only for Universal 10 / XAML which does a lot of "thunking" between the threads to pass data entry along with all of my custom XAML input panels.

    ugh, I don't think that's what Unity intended here....
     
  18. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,478
    Definitely not. Will wait for Aurimas to comment.
     
  19. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    Most recent 5.4 does.
     
  20. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Hummmm... I didn't know it! So now It's better to generate a D3D build than a XAML one?
     
  21. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    The project works for me on Surface 3 :/
    Which version of Visual Studio/SDK do you use? Is Windows on device up to date?
     
  22. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    It depends on what use case. Some plugins still require XAML. As does playing fullscreen movie.
    If all you need is Unity rendering stuff and touch screen keyboard, then probably there is no reason to use XAML.
     
  23. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    Visual Studio 2015 Professional with Update 2, and I have the following SDKs installed:

    10.0.26624
    10.0.10586.212

    (which I believe come with the default universal installation with Update 2)

    This surface pro 3 has the following:
    Edition: Windows Pro
    Version: 1511
    OS Build: 10586.420

    I've double checked it for Windows Update and it looks up-to-date.
     
  24. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    This is good to know, as the project requires full-screen video. I'm not so much concerned with it all working in D3D, but that would be nice to do one day also... :)
     
  25. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    I use Visual Studio Update 3, Surface 3 has a bit older build, I'll try to update it.

    As a workaround you can put this line before initializing Unity:
    appCallbacks.AddCommandLineArg("-forceTextBoxBasedKeyboard");

    this will force using older implementation for keyboard (requires XAML).
     
  26. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    hmm, ok I see the updates today in visual studio.. also, there is update to Tools 1.4, I may try that first.. it's a bit scary because Update 1 and 2 to Visual Studio has been a disaster so far. :)
     
  27. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    I applied Update 3, same results for both IL2CPP and .NET on the Universal 10/XAML test project.

    I tried to apply the "-forceTextBoxBaseKeyboard" to both .NET and IL2CPP builds.. perhaps I did not apply it properly, but tried several locations (in both App.xaml.cs and MainPage.xaml.cs) without any change.

    first here:
    Code (CSharp):
    1.  
    2. public App()
    3.         {
    4.             this.InitializeComponent();
    5.             appCallbacks = new AppCallbacks();
    6.            
    7.             appCallbacks.AddCommandLineArg("-forceTextBoxBasedKeyboard");  //<<<
    8.  
    9.         }
    10.  
    then before setting up bridge:

    Code (CSharp):
    1. public MainPage()
    2.         {
    3.             this.InitializeComponent();
    4.             NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Required;
    5.  
    6.             AppCallbacks appCallbacks = AppCallbacks.Instance;
    7.             appCallbacks.AddCommandLineArg("-forceTextBoxBasedKeyboard"); // <<<<<<
    8.             // Setup scripting bridge
    9.             _bridge = new WinRTBridge.WinRTBridge();
    10.             appCallbacks.SetBridge(_bridge);
    11.  

    in IL2CPP:

    I simply tried adding "appArgs += "-forceTextBoxBasedKeyboard;"; any where prior to InitializUnity(appArgs); to no avail... probably isn't the right way to do it in IL2CPP, thought I would try anyway.

    regardless, nothing different, same symptoms.. no keyboard function, virtual keyboard only certain keys work, hand-writing mode seems ok.
     
  28. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,478
    Which Unity version are you on?
     
  29. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    5.3.5p5
     
  30. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    Hey, I remembered seeing similar issue. I believe this bug is fixed in latest version. Try updating to the most recent 5.3 patch release.
     
  31. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    updated to 5.3.5p6,

    same issue... did not solve the problem
     
  32. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    So happy I can find this thread again... ;)

    Any news related to this?
     
  33. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,478
    Yes. I actually reviewed a PR from Aurimas 4 days ago :p. Not sure why he was quiet about it. The fix landed to 5.3.6p1.
     
    tswalk likes this.
  34. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    ......Thanks,... Is that version available?
     
    Last edited: Jul 12, 2016
  35. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,478
    Not gonna be out by tomorrow I'm afraid.
     
    tswalk likes this.
  36. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    Just my luck ;)

    Thanks, I'll keep an eye out for it...