目标平台的默认键盘布局。
下面是一个 iPhone 示例:
using UnityEngine; using UnityEngine.iOS;
public class ExampleClass : MonoBehaviour { private TouchScreenKeyboard keyboard;
protected void OnGUI() { GUI.skin.button.fontSize = 36; if (GUILayout.Button("Keyboard")) { keyboard = TouchScreenKeyboard.Open("Hello", TouchScreenKeyboardType.Default); } } }