Virtual Keyboard

Overview

Gameface for Unity3D allows you to use virtual keyboards through the Unity3D Gameface interface. When the focus input field from your page virtual keyboard will appear.

The input field will be updated only after the virtual keyboard has been closed and the input has been submitted.

Supported platforms:

  • Android
  • iOS
  • Xbox XDK
  • Xbox GDK
  • PS4 and PS5

How To Use

For Android and iOS:

  1. Add a CohtmlView component with an HTML page with a generic input field.

    <!DOCTYPE html>
    <head>
    </head>
    <body>
        <input type="text">
    </body>
    </html>
    
  2. Attach a CohtmlTouchKeyboard component somewhere on the scene.

Virtual keyboard for Consoles

  1. Add a CohtmlView component with an HTML page with a generic input field.

    <!DOCTYPE html>
    <head>
    </head>
    <body>
        <input type="text">
    </body>
    </html>
    
  2. Attach the Cohtml Keyboard component somewhere on the scene.

  3. Optionally set up the Cohtml Keyboard properties.

Tips and best practices

You can refer to the value of the input with the text property.

The input field will be updated only after the virtual keyboard has been closed and the input has been submitted.

It’s not necessary to attach virtual keyboards component on CohtmlView or CohtmlUISystem GameObjects but it is good practice to keep them in the same place for the best hierarchy structure.

Do not add 2 or more virtual keyboard components of the same type to one scene. It’s enough to have only one CohtmlTouchKeyboard and/or CohtmlXboxKeyboard on the scene.