Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Help!!! Texfield opened by TouchScreenKeyboard() is not display

Discussion in 'Extensions & OnGUI' started by MilC, May 14, 2015.

  1. MilC

    MilC

    Joined:
    May 28, 2013
    Posts:
    1
    Usually call TouchScreenKeyboard() to show input UI(include keyboard, textfield, and buttons), as following diagram:


    however, After the third party’s UI display and native keyboard is called, then go back to the game login UI and call the TouchScreenKeyboard() method, the textfield is not show, as follow:

    Any idea on what the issue is? Any help will be greatly appreciated..
     

    Attached Files:

  2. LiuLie

    LiuLie

    Joined:
    May 29, 2015
    Posts:
    2
    Hi,
    I found the same problem on IOS(Unity 4.6.5 p4 il2cpp) after using the 3rd party's SDK..
     
  3. dayong

    dayong

    Joined:
    Nov 27, 2013
    Posts:
    1
    I fixed this bug by change a line in Keyboard.mm

    Code (CSharp):
    1. diff -uNr a/Classes/UI/Keyboard.mm b/Classes/UI/Keyboard.mm
    2. --- a/Classes/UI/Keyboard.mm    2015-07-16 17:34:58.000000000 +0800
    3. +++ b/Classes/UI/Keyboard.mm    2015-08-03 10:05:50.000000000 +0800
    4. @@ -254,8 +254,8 @@
    5.          unsigned statusHeight = statusFrame.size.height;
    6.          fieldToolbar.frame    = CGRectMake(0, y - kInputBarSize - statusHeight, kbRect.size.width, kInputBarSize);
    7. -        textField.frame    = CGRectMake(inputView.frame.origin.x, inputView.frame.origin.y,
    8. -                                     kbRect.size.width - 3*18 - 2*50, inputView.frame.size.height
    9. +        textField.frame    = CGRectMake(textField.frame.origin.x, textField.frame.origin.y,
    10. +                                     kbRect.size.width - 3*18 - 2*50, textField.frame.size.height
    11.                                       );
    12.      }
    13.  
     
  4. swanky_wu

    swanky_wu

    Joined:
    Oct 17, 2015
    Posts:
    1
    @dayong works for me! like +1