Forum rules - please read before posting.

Mobile Input Keyboard Missing

Hi everyone, I am creating a mobile game and I have an input box for the player to add their name. However, when I run the game on android the keyboard is not popping up. Are AC input boxes supported by i0S/Android? And if not is there a workaround to call the keyboard to the input box? Let me know if you need any additional information/screenshots. Thank you.

Comments

  • Welcome to the community, @Riderdye.

    Yes, a platform-native keyboard should appear upon tapping an Input menu's element when running a build on iOS or Android.

    What are your AC and Unity versions, and can you share a screenshot of the Input element's properties?

    Does it behave like a regular input box when testing in the Editor?

  • Hi @ChrisIceBox thank you for your response.

    AC - V.1.71.0
    Unity - 2019.2.17f1

    Here are the screenshots:
    https://ibb.co/S562NnR (Menu Properties)
    https://ibb.co/GRpzZR4 (Input Element)

    It will let me enter a name with a keyboard when I press play in the unity editor and it transfers over to the token perfectly. However when I build and run onto my android, or while using unity remote no keyboard will show up. Please let me know if you need any additional information!

  • Thanks - things look OK from what I can see here.

    What if you check Require selection to accept input?, and is your Settings Manager's Input method set to Touch Screen?

    I'll attempt a recreation.

  • Found the culprit. Open up PlayerMenus.cs, and find the SelectInput box function around line 2145.

    Replace its contents with the following:

    public virtual void SelectInputBox (MenuInput input)
    {
        selectedInputBox = input;
    
        // Mobile keyboard
        #if (UNITY_IPHONE || UNITY_ANDROID) && !UNITY_EDITOR
        TouchScreenKeyboardType keyboardType = (input.inputType == AC_InputType.NumbericOnly)
                                                ? TouchScreenKeyboardType.NumberPad
                                                : TouchScreenKeyboardType.ASCIICapable;
    
        keyboard = TouchScreenKeyboard.Open (input.label, keyboardType, false, false, false, false, string.Empty);
    
        #if UNITY_2018_3_OR_NEWER
        keyboard.characterLimit = input.characterLimit;
        #endif
    
        #endif
    }
    

    I'll make the same change to the next official release.

  • @ChrisIceBox Yes! That was it. Thank you so much. I appreciate you taking the time to help me.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.