Class vGear_VirtualKeyboard
3D Virtual Keyboard for typing.
輸入用的 3D 虛擬鍵盤。
Inheritance
Namespace: Votanic.vXR.vGear
Assembly: Votanic.vXR.dll
Syntax
[AddComponentMenu("")]
public class vGear_VirtualKeyboard : MonoBehaviour
Fields
autoClose
Auto close if no input field is focused.
當沒有輸入欄被專注時自動關閉。
Declaration
[Tooltip("Auto close if no input field is focused.\n當沒有輸入欄被專注時自動關閉。")]
public bool autoClose
Field Value
Type | Description |
---|---|
System.Boolean |
autoOpen
Auto open if an input field is focused.
當有輸入欄被專注時自動打開。
Declaration
[Tooltip("Auto open if an input field is focused.\n當有輸入欄被專注時自動打開。")]
public bool autoOpen
Field Value
Type | Description |
---|---|
System.Boolean |
faceAngle
Default face angle of keyboard.
鍵盤預設面向角度。
Declaration
[Tooltip("Default face angle of keyboard.\n鍵盤預設面向角度。")]
public float faceAngle
Field Value
Type | Description |
---|---|
System.Single |
inputField
Current input field.
目前的輸入欄。
Declaration
[Header("[Status]")]
[Tooltip("Current input field.\nUI 目前的輸入欄。")]
public InputField inputField
Field Value
Type | Description |
---|---|
UnityEngine.UI.InputField |
isOpened
Return true if the keyboard is opened.
當鍵盤打開時傳回 true。
Declaration
[Tooltip("Return true if the keyboard is opened.\nUI 當鍵盤打開時傳回 true。")]
public bool isOpened
Field Value
Type | Description |
---|---|
System.Boolean |
keys
Keys of keyboard.
鍵盤的鍵。
Declaration
[Header("[Components]")]
[Tooltip("Keys of keyboard.\n鍵盤的鍵。")]
public List<vGear_VirtualKey> keys
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<vGear_VirtualKey> |
offset
Default relative open position offset.
鍵盤預設相對打開位置偏移值。
Declaration
[Tooltip("Default relative open position offset.\n鍵盤預設相對打開位置偏移值。")]
public Vector3 offset
Field Value
Type | Description |
---|---|
UnityEngine.Vector3 |
predictionKeys
Prediction keys.
預測鍵。
Declaration
[Tooltip("Prediction keys.\n預測鍵。")]
public List<vGear_VirtualKey> predictionKeys
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<vGear_VirtualKey> |
predictionWords
List of word prediction.
單詞預測列表。
Declaration
[Tooltip("List of word prediction.\n單詞預測列表。")]
public List<string> predictionWords
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
shift
Shift value of keyboard.
鍵盤替換值。
Declaration
[Tooltip("Shift value of keyboard.\n鍵盤替換值。")]
public int shift
Field Value
Type | Description |
---|---|
System.Int32 |
swipeMode
Swipe input mode for trigger interaction.
點擊互動的滑動輸入模式。
Declaration
[Tooltip("Swipe input mode for trigger interaction.\n點擊互動的滑動輸入模式。")]
public SwipeMode swipeMode
Field Value
Type | Description |
---|---|
SwipeMode |
vibration
Vibration when hit the key.
當擊中按鍵時震動。
Declaration
[Header("[Settings]")]
[Tooltip("Vibration when hit the key.\n當擊中按鍵時震動。")]
public bool vibration
Field Value
Type | Description |
---|---|
System.Boolean |
Methods
Close()
Close keyboard.
關閉鍵盤。
Declaration
public void Close()
Open()
Open keyboard.
打開鍵盤。
Open(Vector3.zero, Vector3.zero)
Declaration
public void Open()
Open(Vector3, Vector3)
Open keyboard.
打開鍵盤。
Open(Vector3.zero, Vector3.zero)
Declaration
public void Open(Vector3 position, Vector3 eulerAngles)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Keyboard position |
UnityEngine.Vector3 | eulerAngles | Keyboard euler angles |
SetInputField(InputField)
Set an input field for this keyboard.
為這個鍵盤設定輸入欄。
SetInputField(inputField)
Declaration
public void SetInputField(InputField inputField)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.UI.InputField | inputField | Target input field |
SetShift(Int32)
Set the shift value of keyboard.
設定鍵盤替換值。
Declaration
public void SetShift(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Page |
SetVibration(Boolean)
Enable or disable vibration.
啟用或停用震動。
SetVibration(true)
Declaration
public void SetVibration(bool vibrate)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | vibrate | Vibrate if true |