简体   繁体   English

空间网格不显示在 hololens2 模拟器中

[英]Spatial Mesh do not show in hololens2 emulator

I'm using Hololens 2 emulator version 10.0.19041.1157我正在使用 Hololens 2 模拟器版本 10.0.19041.1157
MRTK version 2.6.1 MRTK 版本 2.6.1
Unity Version 2020.1.0a12.1360 Unity 版本 2020.1.0a12.1360
Windows 10 64bit视窗 10 64 位

In unity, i can see example mesh loaded from spatial mapping data ["MixedRealityToolkit" GameObject ->Spatial Awareness -> Spatial Objet mesh Observer -> Type ->SpatialObjectMeshObserver].在 unity 中,我可以看到从空间映射数据加载的示例网格 ["MixedRealityToolkit" GameObject ->Spatial Awareness -> Spatial Objet mesh Observer -> Type ->SpatialObjectMeshObserver]。
I have attached a script to Gameobject that draws lines on this spatial mapping as attached in screenshot below我已将脚本附加到 Gameobject 上,该脚本在此空间映射上绘制线条,如下面的屏幕截图所示

void Start()
{
    IMixedRealitySpatialAwarenessSystem spatialAwarenessSystem;
    spatialAwarenessSystem = CoreServices.SpatialAwarenessSystem;
    spatialAwarenessSystem.ResumeObservers();
}

![[插入统一截图]

while building the app to hololens in unity, i'm setting the value在统一构建应用程序到 hololens 时,我正在设置值
["MixedRealityToolkit" GameObject ->Spatial Awareness -> Spatial Objet mesh Observer -> Type ->WindowsMixedRealitySpatialMeshObserver] [“MixedRealityToolkit”游戏对象 -> 空间感知 -> 空间对象网格观察器 -> 类型 ->WindowsMixedRealitySpatialMeshObserver]

I have enabled "SpatialPerception" under Player Settings->Publishing Settings->Capabilities.我在播放器设置-> 发布设置-> 功能下启用了“空间感知”。

There are no build errors, App Deployment from Visual Studio to Hololens emulator is successful [x64, Release]没有构建错误,从 Visual Studio 到 Hololens 模拟器的 App 部署成功 [x64, Release]
Note: i have loaded default room in emulator.注意:我已经在模拟器中加载了默认房间。

upon app start, i don't see spatial mesh in emulator like i used to see in unity.在应用程序启动时,我在模拟器中看不到空间网格,就像我以前在 unity 中看到的那样。
although i can see spatial mesh in webportal of emulator as shown in below screenshot.虽然我可以在模拟器的门户网站中看到空间网格,如下面的屏幕截图所示。

![插入带有网格的浏览器屏幕截图

First, we always recommend the latest MRTK version as the best version to develop the MR app, and the current recommendation is to use MRTK 2.7.2.首先,我们一直推荐最新的MRTK版本作为开发MR app的最佳版本,目前推荐使用MRTK 2.7.2。 Please review the Upgrade Guide for guidance on how to upgrading your project.请查看升级指南以获取有关如何升级项目的指导。

For the Spatial Mesh does not visible in Hololens2, Spatial Observers are platform-specific components that act as the provider for surfacing various types of mesh data from a platform-specific endpoint.由于空间网格在 Hololens2 中不可见,空间观察器是特定于平台的组件,它们充当从特定于平台的端点呈现各种类型的网格数据的提供者。 Therefore, please select the WindowsMixedRealitySpatialMeshObserver class which supports the HoloLens2 platform and modify configuration properties on the observer as necessary: Configuring mesh observers for the device因此,请选择支持 HoloLens2 平台的WindowsMixedRealitySpatialMeshObserver类,并根据需要修改观察者的配置属性: 为设备配置网格观察者

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

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