GvrKeyboardCanvas prefab
Customizable text canvas that provides keyboard input in VR using the Daydream controller.
Requires an instance of the GvrKeyboardManager
prefab in the scene.
Position this game object in the scene so that the text canvas is visible to the player during text entry. To bring up the keyboard when the player clicks on the text canvas, connect the EventTrigger's "Pointer Click" event to the GvrKeyboardManager's GvrKeyboard.OnPointerClick
method, following the example in the included KeyboardDemo scene:
Prefab Hierarchy
Game object name | Description |
---|---|
Positions worldscale canvas that holds the text component. |
|
└
Background
|
Renders the customizable background behind the text component. |
└
KeyboardText
|
Renders the customizable text component. |
GvrKeyboardCanvas game object
Positions worldscale canvas that holds the text component.
Components: GvrPointerGraphicRaycaster, UnityEngine.BoxCollider, UnityEngine.Canvas, UnityEngine.EventSystems.EventTrigger, UnityEngine.RectTransform, UnityEngine.UI.CanvasScaler
Background game object
Renders the customizable background behind the text component.
Components: UnityEngine.CanvasRenderer, UnityEngine.RectTransform, UnityEngine.UI.Image
KeyboardText game object
Renders the customizable text component.
Components: UnityEngine.CanvasRenderer, UnityEngine.RectTransform, UnityEngine.UI.Text