xml - Is the UWP manifest element "uap6:SpatialBoundingBox" functioning for the HoloLens 2?
问题描述
I have implemented a 3D launcher model in glb format following the guide here. I am able to see the model in the Windows Mixed Reality home area, and the animations are functioning properly.
According to the documentation, the element uap6:SpatialBoundingBox is available for computers running Windows RS4 (1803) or later. I am running Windows 10 Pro version 1809, Visual Studio 2019, target platform version 10.0.10240.0, compiling a D3D project for ARM in Release.
However, no matter what values I provide for the SpatialBoundingBox element, the launcher's bounding box viewed in the home area does not seem to change. For example:
<uap6:SpatialBoundingBox Center=”1,-2,3” Extents=”1,2,3” />
vs
<uap6:SpatialBoundingBox Center=”0,2,0” Extents=”123,231,312” />
I have found on some occasions that the documentation is either ahead or behind the current state of the Hololens features, so I wanted to see if anyone else has been able to successfully implement a bounding box override.
Sample manifest with identifying information replaced:
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" xmlns:mobile="http://schemas.microsoft.com/appx/manifest/mobile/windows10" IgnorableNamespaces="uap uap2 uap5 uap6 mp" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:uap6="http://schemas.microsoft.com/appx/manifest/uap/windows10/6">
<Identity Name="EXAMPLE" Publisher="CN=TheEXAMPLECompany" Version="0.0.0.0" />
<mp:PhoneIdentity PhoneProductId="00000000-0000-0000-0000-000000000000" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>EXAMPLE</DisplayName>
<PublisherDisplayName>TheEXAMPLECompany</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10240.0" MaxVersionTested="10.0.18362.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="EXAMPLE.App">
<uap:VisualElements DisplayName="EXAMPLE" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="Test capabilities for EXAMPLE." BackgroundColor="transparent">
<uap:DefaultTile ShortName="EXAMPLE" Wide310x150Logo="Assets\Wide310x150Logo.png" Square71x71Logo="Assets\Square71x71Logo.png" Square310x310Logo="Assets\Square310x310Logo.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square310x310Logo" />
</uap:ShowNameOnTiles>
<uap5:MixedRealityModel Path="Assets\My3DTile.glb">
<uap6:SpatialBoundingBox Center=”1,2,3” Extents=”30,20,30” />
</uap5:MixedRealityModel>
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#FFFFFF" />
<uap:InitialRotationPreference>
<uap:Rotation Preference="landscape" />
<uap:Rotation Preference="portrait" />
<uap:Rotation Preference="portraitFlipped" />
</uap:InitialRotationPreference>
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<uap2:Capability Name="spatialPerception" />
<DeviceCapability Name="webcam" />
<DeviceCapability Name="microphone" />
</Capabilities>
</Package>
解决方案
是的,HoloLens 2 的 3D 应用启动器功能正在运行。请确保您的应用程序在 HoloLens 上针对的 Windows SDK 版本大于或等于10.0.17125,您当前的目标平台版本 10.0.10240.0 太低。在此处查看我们的文档
感谢您提出这一点,我们发现Extents
字段设置在 HoloLens 上效果不佳,它应该旨在控制从边界框中心到其边缘的距离,沿每个轴。我们已通过内部渠道将此问题报告给产品团队,但无法保证 ETA。
推荐阅读
- c++ - (C++) 如果用户已经在 main 中输入了值,如何将局部变量从 main 传递到另一个函数的主体?
- react-native - 如何使用 @react-navigation/native 删除 react native 中的上一页
- r - 当列不存在时运行代码(尽管最后有一个数字)?- 使困惑
- c# - 定义触发器列表以执行作业
- kotlin - 如何抛出异常并记录为信息?
- c# - WPF 将不同的形状绑定到 ItemsControl 中的 DataTemplate
- sql - 在 SQL 中使用 SELECT 设置变量值时出错
- java - Hibernate 仅检索一列,其他列为空
- r - 在数据框中查找包含另一个数据框行的所有元素的行
- nginx - 如何删除“www.” 来自 $ssl_server_name