Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public class TouchKeyboardExample : Monobehaviour {
  2.  
  3. private TouchScreenKeyboard touchScreenKeyboard;
  4. private string inputText = string.Empty;
  5.  
  6. void Start () {
  7. touchScreenKeyboard = TouchScreenKeyboard.Open(inputText, TouchScreenKeyboardType.Default);
  8. }
  9.  
  10. void Update () {
  11. if(touchScreenKeyboard == null)
  12. return;
  13. inputText = touchScreenKeyboard.text;
  14. if(touchScreenKeyboard.done)
  15. Debug.Log("User typed in "+inputText);
  16. if(touchScreenKeyboard.wasCanceled)
  17. Debug.Log("User canceled input");
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement