简体   繁体   English

如何在 Unity VR 中启用触摸键盘?

[英]How do I enable touch keyboard in Unity VR?

I have a question if you can answer me it will delight me.我有一个问题,如果你能回答我,我会很高兴。 How do you enable the touch screen keyboard?如何启用触摸屏键盘? Is it inside the XR Interaction Toolkit?它在 XR 交互工具包中吗? I have no clue or whatsoever to get that touch keyboard out and use it in a input field in Unity.我没有任何线索或任何方法来获取该触摸键盘并在 Unity 的输入字段中使用它。

Usually the touchscreen keyboard opens up on its own when you click on an InputField.通常,当您单击 InputField 时,触摸屏键盘会自行打开。

However if it doesn't, you should be able to open it manually like this in C#但是,如果没有,您应该可以在 C# 中像这样手动打开它

public void OpenKeyboard()
{
     TouchScreenKeyboard.Open("");
}

You can learn more about the touchscreen keyboard and its properties right here.您可以在此处了解有关触摸屏键盘及其属性的更多信息。

Hope this helped you :)希望这对你有帮助:)

You can enable touch keyboard in the VR application using XR Interaction Toolkit and Oculus Integration package.您可以使用XR 交互工具包Oculus 集成包在 VR 应用程序中启用触摸键盘。

Even though Oculus supports the system keyboard in the VR apps but sometimes it won't work for the inputs like InputField.尽管 Oculus 在 VR 应用程序中支持系统键盘,但有时它不适用于 InputField 等输入。

If you want to enable a virtual keyboard using Oculus then refer to the following answer: https://stackoverflow.com/a/70431161/7103882如果您想使用 Oculus 启用虚拟键盘,请参考以下答案: https ://stackoverflow.com/a/70431161/7103882

If you want to enable a virtual keyboard using XR Interaction Toolkit then refer to the following steps:如果您想使用 XR Interaction Toolkit 启用虚拟键盘,请参考以下步骤:

NB: Sometimes oculus system keyboard support won't work.注意:有时 oculus 系统键盘支持不起作用。 So, I recommend you to try with XR Interaction Toolkit if the Oculus version is not supported.因此,如果不支持 Oculus 版本,我建议您尝试使用 XR Interaction Toolkit。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM