问题
I am attempting to create an input field in a google daydream app using the latest Google VR SDK for Unity and Unity 5.4.2.
I am wondering if someone may have insight into integrating the Daydream Keyboard. I can place a canvas and input field but when I run the application on the Pixel and Daydream View, and select the inputfield the standard android keyboard renders.
I am not sure if the Daydream Keyboard needs to be integrated separately in unity.
The Daydream keyboard is installed and is functional on published daydream apps.
回答1:
Nope, the official Daydream Keyboard is not Unity ready, see https://forum.unity3d.com/threads/daydream-keyboard-in-unity.441448/
回答2:
You can download the GoogleVR SDK, and you will find the keyboard demo scene inside GoogleVR/Demos/Scenes. From there, you can use the prefabs given for keyboard.
Apart from this, you can use the free asset "CurvedKeyboard" from asset store.
To handle the android default keyboard, you can do something like this.
public class SomeClass:MonoBehaviour
{
private TouchScreenKeyboard defaultKeyboard;
void Start ()
{
defaultKeyboard = TouchScreenKeyboard.Open ("", TouchScreenKeyboardType.Default);
defaultKeyboard.active = false;
}
public void didClickOnTextField()
{
defaultKeyboard.active = false;
}
}
来源:https://stackoverflow.com/questions/40614674/google-daydream-keyboard-unity-ui-textinput