Here is my first pass in adding a way to do input fields for PlayCanvas UI
https://developer.playcanvas.com/en/tutorials/ui-text-input/
On mobile, the input box appears above the on screen keyboard
To add this to your project, copy the folder ‘ui-input’ and paste to your own project and add uiInputField script to Element Entities that represent the input area.
For an example, copy the Template ‘Text Input Field’ and paste to your own project.
Limitations:
- Only screen space screens are supported
- (iOS) Input fields are not interactable for 2 secs after a canvas resize event
- Only single line input fields are available to type text in
Please let me know if there is anything you want too see added or if there’s a use case that isn’t supported
v1.5
- Fixed resize bug on desktop where it would change to mobile input style when window was resized
v1.4
- Fixed desktop ‘in place’ styling for input fields
v1.3
- Left/Right safe areas are now supported (for notches when in landscape mode)
v1.2
- Fixed input field width on Firefox Android
v1.1
- Text input moved to the top (solves many CSS positioning issues on iOS)
- Enter key hints
- Added input type decimal as numpad on iOS doesn’t have the .
- Added workaround where the inputfield no longer used numpad mode after typing a password
- Placeholder string is also used for the HTML input field
v1.0
- First release