我关注了Unity Blog Post tutorial。在Unity IDE中一切正常,但当我构建它时,UWP应用程序抛出了一个异常:
InvalidOperationException: Enable VR Streaming to allow connection to remote holographic device我的Unity版本: 2018.03
有没有人知道解决办法?
发布于 2019-02-18 22:00:21
以下是它的解决方案:
至于在Unity UWP版本中具有全息遥控功能,你应该在播放器XR设置中打开'WSA全息遥控‘并加载两个SDK,第一个应该设置为'None’,第二个应该设置为'Windows Mixed Reality‘。如果您不这样做,您的UWP应用程序将在混合现实门户中打开,而不是普通的应用程序。
在Start()方法中,您可以在脚本中的任何位置加载WindowsMR SDK,如下所示:
private void Start()
{
StartCoroutine(LoadingWindowsMrWrapper());
}
private IEnumerator LoadingWindowsMrWrapper()
{
yield return new WaitForSeconds(1);
StartCoroutine(LoadDevice("WindowsMR"));
}
private static IEnumerator LoadDevice(string newDevice)
{
XRSettings.LoadDeviceByName(newDevice);
yield return null;
XRSettings.enabled = true;
}如果你有一个UI连接按钮,你可以调用你的HolographicRemoting.Connect(ipAddress);。至此,您应该已经连接上了。
此外,在应用程序退出之前,请确保您已断开连接。
如果它对你不起作用,请告诉我。
发布于 2019-02-16 21:00:33
如果使用MRTK,请使用菜单项应用项目设置。
Mixed Reality Toolkit > Configure > Apply Mixed Reality Project Settings否则,请按照微软的instructions使用全息镜头/统一,您链接的教程假定已经完成。关键选项可能是:
Player Settings > Universal Windows Platform tab > XR Settings group > Virtual Reality Supported https://stackoverflow.com/questions/54714532
复制相似问题