Version: 2020.1
언어: 한국어
Method group is Obsolete

TouchScreenKeyboard.done

매뉴얼로 전환
Obsolete public bool done ;

설명

Specifies 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.

using UnityEngine;

public class Example : MonoBehaviour { // Opens a keyboard and shows what has been typed.

TouchScreenKeyboard keyboard; public string text = "";

void Start() { keyboard = TouchScreenKeyboard.Open(text, TouchScreenKeyboardType.Default); }

void Update() { if (keyboard != null && keyboard.status == TouchScreenKeyboard.Status.Done) { text = keyboard.text; print("User input is: " + text); } } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961