Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TouchKeyboardExample : Monobehaviour {
- private TouchScreenKeyboard touchScreenKeyboard;
- private string inputText = string.Empty;
- void Start () {
- touchScreenKeyboard = TouchScreenKeyboard.Open(inputText, TouchScreenKeyboardType.Default);
- }
- void Update () {
- if(touchScreenKeyboard == null)
- return;
- inputText = touchScreenKeyboard.text;
- if(touchScreenKeyboard.done)
- Debug.Log("User typed in "+inputText);
- if(touchScreenKeyboard.wasCanceled)
- Debug.Log("User canceled input");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement