首页 > 解决方案 > 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>

标签: xmluwphololenswindows-mixed-realityappxmanifest

解决方案


是的,HoloLens 2 的 3D 应用启动器功能正在运行。请确保您的应用程序在 HoloLens 上针对的 Windows SDK 版本大于或等于10.0.17125,您当前的目标平台版本 10.0.10240.0 太低。在此处查看我们的文档

感谢您提出这一点,我们发现Extents字段设置在 HoloLens 上效果不佳,它应该旨在控制从边界框中心到其边缘的距离,沿每个轴。我们已通过内部渠道将此问题报告给产品团队,但无法保证 ETA。


推荐阅读