Virtual Keyboard
Overview
Prysm for Unity3D allows you to use virtual keyboards through the Unity3D Prysm 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:
Add a
CohtmlView
component with an HTML page with a generic input field.<!DOCTYPE html> <head> </head> <body> <input type="text"> </body> </html>
Attach a
CohtmlTouchKeyboard
component somewhere on the scene.
Virtual keyboard for Consoles
Add a
CohtmlView
component with an HTML page with a generic input field.<!DOCTYPE html> <head> </head> <body> <input type="text"> </body> </html>
Attach the
Cohtml Keyboard
component somewhere on the scene.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.