VirtualKeyboard
A class in Root.Township, the global namespace.
In-world VR keyboard that builds keys from a VirtualKeyboardSetup, optionally bent around an axis, and keeps the typed text. Client side.
- Listed in Global namespace: T to X
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
VirtualKeyboard() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
13 private and internal fields
| Member | What it is |
|---|---|
private Vector3 bendingAxis | Axis the keyboard curves around when bendingRadius is positive. |
private Vector3 bendingNormal | Direction the keyboard faces, used when bending the key layout. |
private float bendingRadius | Radius of the keyboard's curve. Zero or less (the default is -1) keeps the keys flat. |
private float doubleShiftTimer | Seconds within which a second shift press locks shift (default 0.5). |
private string input | Backing field for Input, the text typed so far. |
private bool isShiftLocked | True when shift is locked by a double press, so it stays on after typing a character. |
private Transform keyParent | Transform the spawned keys are parented to. |
private VirtualKey keyPrefab | The VirtualKey prefab spawned for each key. |
private Vector2 originOffset | Offset added to every key's layout position after scaling. |
private float scale | Multiplier applied to the key layout positions. |
private VirtualKeyboardSetup setup | The VirtualKeyboardSetup asset that lists the keys and their layout positions. |
private GameObject shiftLockMarker | Object meant to show that shift lock is on. Not used in this class's code. |
private float timeToDoubleShift | Real time until which a second shift press counts as a double press. |
Properties
Events
Methods
6 private and internal methods
Used in
Members of other types that take, return or hold a VirtualKeyboard: