Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseSpecifies if input process was finished. (Read Only)
Keyboard input process can be finished either by user tapping "Done"
button or script setting active
property to false. Note that keyboard
might be temporarily inactive (either by sliding in/out due to
orientation change or by appearance of another keyboard), however its
input process might still be not finished and will be resumed
automatically.
// Opens a keyboard and shows what has been typed.
private var keyboard : TouchScreenKeyboard; var text : String = "";
function Start() { keyboard = TouchScreenKeyboard.Open(text, TouchScreenKeyboardType.Default); } function Update() { if (keyboard != null && keyboard.done) { text = keyboard.text; print ("User input is: " + text); } }