如何使用适用于HoloLens 1的MRTK v2 RC构建和部署可工作的统一应用程序?

时间:2019-04-15 10:30:01

标签: visual-studio unity3d hololens mrtk

问题
综上所述,Unity和Visual Studio 2017均会构建项目,部署项目,但是一旦打开应用程序,则什么都不会出现,甚至没有Unity启动屏幕。但是,在HoloLens上做出大花样的手势证明该应用程序是“打开的”并且可关闭,但这已经足够了。

我们尝试过的事情
我们的部署目标是为该设备运行最新操作系统的HoloLens 1(10.0.17763.380)。
我们在这里通过了提供的解决方案: MRTK (V2) Need to update Hololens?

如下图所示:
注意:下图显示了Visual Studio 2019,但我们使用Visual Studio 2017和Visual Studio 2019对这两种情况进行了测试。 build settings

我们安装了Windows 10 Insider Preview SDK(请原谅丹麦人) win18362sdk

并尝试遵循此处提供的解决方案: Cannot build with MRTK v2.0.0-RC1

似乎与该问题的其他答案相矛盾。 win18362sdk2
但是,这种尝试采用解决方案的方法又提供了另一个错误,即部署目标(HoloLens 1)必须运行OS 10.0.18326,这是有道理的,因为就我们所知,该操作系统不适用于该特定设备。如前所述,我们在最新的操作系统10.0.17763上运行。

就将C#语言更改为7.2而言,我们遇到了麻烦,因为所有指南都说要从 Solution Properties 中的 Build 访问该语言,但是我们找不到此标签。当我们在Visual Studio层次结构中右键单击projectname.sln后,尝试按“属性”时,会发生以下情况:

builttab

但是,我们希望可以像下面这样更改语言设置: builttab

但是,正如您所看到的,没有“构建”标签,并且我们看到的内容与我们建议的内容略有不同。

我们希望得到的东西
可以打开的HoloLens 1应用程序可以正常运行,就像MRTK v2 Beta版本一样。

实际发生的情况
正如问题中提到的那样,该应用程序已构建并部署,但不仅充满错误,而且打开已构建的应用程序时也没有显示任何内容。


可以在此处看到统一错误:

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Normal` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Quaternion Windows.Perception.People.JointPose::Orientation` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.People.JointPose::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Origin` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update().
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Direction` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update().
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Reference Rewriter found some errors while running with command "--target=Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" "--target=Temp\StagingArea\Data\Managed\Unity.Analytics.DataPrivacy.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Utilities.Gltf.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.TeleportSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.InputSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.DiagnosticsSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.BoundarySystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.SDK.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Extensions.PhotoCapture.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Extensions.Experimental.SpectatorView.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Extensions.Experimental.Sharing.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Extensions.Experimental.ScreenRecording.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Extensions.Experimental.MarkerDetection.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Core.Utilities.Async.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Providers.WindowsVoiceInput.dll" "--target=Temp\StagingArea\Data\Managed\Unity.Subsystem.Registration.dll" "--target=Temp\StagingArea\Data\Managed\Unity.TextMeshPro.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.ARExtensions.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.WindowsMR.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.FaceSubsystem.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.ARFoundation.dll" "--target=Temp\StagingArea\Data\Managed\UnityEngine.Timeline.dll" "--target=Temp\StagingArea\Data\Managed\UnityEngine.SpatialTracking.dll" "--target=Temp\StagingArea\Data\Managed\Unity.Analytics.Tracker.dll" "--target=Temp\StagingArea\Data\Managed\Unity.Analytics.StandardEvents.dll" "--additionalreferences=Temp\StagingArea\Data\Managed,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\x86,Temp\StagingArea\Data\Managed\Plugins\x86,Temp\StagingArea\Data\Managed\Plugins\x86,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\ARM,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\x86,Temp\StagingArea\Data\Managed\Plugins\x86,Temp\StagingArea\Data\Managed\Plugins\x86,Temp\StagingArea\Data\Managed\Plugins\x86,Temp\StagingArea\Data\Managed\Plugins\x86" "--platform=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.18362.0\Facade\Windows.winmd" "--dbg=pdb" "--framework=Temp\StagingArea\Data\Managed" "--alt=Microsoft.Win32.SafeHandles,mscorlib;System,mscorlib;System,System;System,System.ComponentModel.Composition;System,System.Core;System.CodeDom.Compiler,System;System.Collections,mscorlib;System.Collections.Concurrent,mscorlib;System.Collections.Concurrent,System;System.Collections.Generic,mscorlib;System.Collections.Generic,System;System.Collections.Generic,System.Core;System.Collections.ObjectModel,mscorlib;System.Collections.ObjectModel,System;System.Collections.Specialized,System;System.ComponentModel,System;System.ComponentModel.DataAnnotations,System.ComponentModel.DataAnnotations;System.ComponentModel.DataAnnotations.Schema,System.ComponentModel.DataAnnotations;System.Data,System.Data;System.Data.Common,System.Data;System.Diagnostics,mscorlib;System.Diagnostics,System;System.Diagnostics.CodeAnalysis,mscorlib;System.Diagnostics.Contracts,mscorlib;System.Diagnostics.Tracing,mscorlib;System.Dynamic,System.Core;System.Globalization,mscorlib;System.IO,mscorlib;System.IO,System;System.IO,System.Core;System.IO.Compression,System;System.IO.Compression,System.IO.Compression.FileSystem;System.IO.IsolatedStorage,mscorlib;System.Linq,System.Core;System.Linq.Expressions,System.Core;System.Net,System;System.Net.NetworkInformation,System;System.Net.Security,System;System.Net.Sockets,System;System.Numerics,System.Numerics;System.Reflection,mscorlib;System.Reflection.Emit,mscorlib;System.Resources,mscorlib;System.Runtime,mscorlib;System.Runtime.CompilerServices,mscorlib;System.Runtime.CompilerServices,System.Core;System.Runtime.ExceptionServices,mscorlib;System.Runtime.InteropServices,mscorlib;System.Runtime.InteropServices,System;System.Runtime.InteropServices,System.Core;System.Runtime.InteropServices.ComTypes,mscorlib;System.Runtime.InteropServices.ComTypes,System;System.Runtime.InteropServices.WindowsRuntime,mscorlib;System.Runtime.Serialization,mscorlib;System.Runtime.Serialization,System.Runtime.Serialization;System.Runtime.Serialization.Json,System.Runtime.Serialization;System.Runtime.Versioning,mscorlib;System.Runtime.Versioning,System;System.Security,mscorlib;System.Security.Authentication,System;System.Security.Authentication.ExtendedProtection,System;System.Security.Claims,mscorlib;System.Security.Principal,mscorlib;System.Text,mscorlib;System.Text.RegularExpressions,System;System.Threading,mscorlib;System.Threading,System;System.Threading,System.Core;System.Threading.Tasks,mscorlib;System.Threading.Tasks,System.Core;System.Windows.Input,System;System.Xml,System.Runtime.Serialization;System.Xml,System.Xml;System.Xml.Linq,System.Xml.Linq;System.Xml.Schema,System.Xml;System.Xml.Serialization,System.Xml;<winmd>,Windows.winmd;<winmd>,Windows.AI.MachineLearning.MachineLearningContract.winmd;<winmd>,Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract.winmd;<winmd>,Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd;<winmd>,Windows.ApplicationModel.Calls.CallsPhoneContract.winmd;<winmd>,Windows.ApplicationModel.Calls.CallsVoipContract.winmd;<winmd>,Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd;<winmd>,Windows.ApplicationModel.SocialInfo.SocialInfoContract.winmd;<winmd>,Windows.ApplicationModel.StartupTaskContract.winmd;<winmd>,Windows.Devices.Custom.CustomDeviceContract.winmd;<winmd>,Windows.Devices.DevicesLowLevelContract.winmd;<winmd>,Windows.Devices.Printers.PrintersContract.winmd;<winmd>,Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract.winmd;<winmd>,Windows.Devices.SmartCards.SmartCardEmulatorContract.winmd;<winmd>,Windows.Foundation.FoundationContract.winmd;<winmd>,Windows.Foundation.UniversalApiContract.winmd;<winmd>,Windows.Gaming.XboxLive.StorageApiContract.winmd;<winmd>,Windows.Graphics.Printing3D.Printing3DContract.winmd;<winmd>,Windows.Networking.Connectivity.WwanContract.winmd;<winmd>,Windows.Networking.Sockets.ControlChannelTriggerContract.winmd;<winmd>,Windows.Services.Maps.GuidanceContract.winmd;<winmd>,Windows.Services.Maps.LocalSearchContract.winmd;<winmd>,Windows.Services.Store.StoreContract.winmd;<winmd>,Windows.Services.TargetedContent.TargetedContentContract.winmd;<winmd>,Windows.System.Profile.ProfileHardwareTokenContract.winmd;<winmd>,Windows.System.Profile.ProfileSharedModeContract.winmd;<winmd>,Windows.System.Profile.SystemManufacturers.SystemManufacturersContract.winmd;<winmd>,Windows.System.SystemManagementContract.winmd;<winmd>,Windows.UI.ViewManagement.ViewManagementViewScalingContract.winmd;<winmd>,Windows.UI.Xaml.Core.Direct.XamlDirectContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ActivationCameraSettingsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ContactActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract.winmd;<winmd>,Windows.ApplicationModel.Calls.LockScreenCallContract.winmd;<winmd>,Windows.ApplicationModel.FullTrustAppContract.winmd;<winmd>,Windows.ApplicationModel.Preview.InkWorkspace.PreviewInkWorkspaceContract.winmd;<winmd>,Windows.ApplicationModel.Preview.Notes.PreviewNotesContract.winmd;<winmd>,Windows.ApplicationModel.Resources.Management.ResourceIndexerContract.winmd;<winmd>,Windows.ApplicationModel.Search.Core.SearchCoreContract.winmd;<winmd>,Windows.ApplicationModel.Search.SearchContract.winmd;<winmd>,Windows.ApplicationModel.Wallet.WalletContract.winmd;<winmd>,Windows.Devices.Portable.PortableDeviceContract.winmd;<winmd>,Windows.Devices.Printers.Extensions.ExtensionsContract.winmd;<winmd>,Windows.Devices.Scanners.ScannerDeviceContract.winmd;<winmd>,Windows.Devices.Sms.LegacySmsApiContract.winmd;<winmd>,Windows.Gaming.Input.GamingInputPreviewContract.winmd;<winmd>,Windows.Gaming.Preview.GamesEnumerationContract.winmd;<winmd>,Windows.Gaming.UI.GameChatOverlayContract.winmd;<winmd>,Windows.Gaming.UI.GamingUIProviderContract.winmd;<winmd>,Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract.winmd;<winmd>,Windows.Management.Deployment.Preview.DeploymentPreviewContract.winmd;<winmd>,Windows.Management.Workplace.WorkplaceSettingsContract.winmd;<winmd>,Windows.Media.AppBroadcasting.AppBroadcastingContract.winmd;<winmd>,Windows.Media.AppRecording.AppRecordingContract.winmd;<winmd>,Windows.Media.Capture.AppBroadcastContract.winmd;<winmd>,Windows.Media.Capture.AppCaptureContract.winmd;<winmd>,Windows.Media.Capture.AppCaptureMetadataContract.winmd;<winmd>,Windows.Media.Capture.CameraCaptureUIContract.winmd;<winmd>,Windows.Media.Capture.GameBarContract.winmd;<winmd>,Windows.Media.Devices.CallControlContract.winmd;<winmd>,Windows.Media.MediaControlContract.winmd;<winmd>,Windows.Media.Playlists.PlaylistsContract.winmd;<winmd>,Windows.Media.Protection.ProtectionRenewalContract.winmd;<winmd>,Windows.Networking.NetworkOperators.LegacyNetworkOperatorsContract.winmd;<winmd>,Windows.Networking.XboxLive.XboxLiveSecureSocketsContract.winmd;<winmd>,Windows.Perception.Automation.Core.PerceptionAutomationCoreContract.winmd;<winmd>,Windows.Security.EnterpriseData.EnterpriseDataContract.winmd;<winmd>,Windows.Security.ExchangeActiveSyncProvisioning.EasContract.winmd;<winmd>,Windows.Storage.Provider.CloudFilesContract.winmd;<winmd>,Windows.System.Profile.ProfileRetailInfoContract.winmd;<winmd>,Windows.System.UserProfile.UserProfileContract.winmd;<winmd>,Windows.System.UserProfile.UserProfileLockScreenContract.winmd;<winmd>,Windows.UI.ApplicationSettings.ApplicationsSettingsContract.winmd;<winmd>,Windows.UI.Core.AnimationMetrics.AnimationMetricsContract.winmd;<winmd>,Windows.UI.Core.CoreWindowDialogsContract.winmd;<winmd>,Windows.UI.Shell.SecurityAppManagerContract.winmd;<winmd>,Windows.UI.Xaml.Hosting.HostingContract.winmd;<winmd>,Windows.Web.Http.Diagnostics.HttpDiagnosticsContract.winmd;<winmd>,Windows.Embedded.DeviceLockdown.DeviceLockdownContract.winmd;<winmd>,Windows.Networking.NetworkOperators.NetworkOperatorsFdnContract.winmd;<winmd>,Windows.Phone.PhoneContract.winmd;<winmd>,Windows.Phone.StartScreen.DualSimTileContract.winmd;<winmd>,Windows.UI.WebUI.Core.WebUICommandBarContract.winmd" "--ignore=System.IConvertible,mscorlib".
Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Normal` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Quaternion Windows.Perception.People.JointPose::Orientation` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Vector3 Windows.Perception.People.JointPose::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Origin` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update().
Error: field `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Direction` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update().

UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1062)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Visual Studio 2017错误可以在这里看到:
(粘贴超过30000个字符的stackoverflow限制,因此我提供了一个pastebin)
https://pastebin.com/bx2QA2wL

2 个答案:

答案 0 :(得分:2)

尝试在Project Settings> Player> Universal Windows Platform settings> XR Settings下禁用支持的WSA Holographic Remoting 标志。

启用该选项后,场景已成功加载,但未显示在屏幕上。

答案 1 :(得分:1)

以“ Reference Rewriter”开头的错误是良性的,可以放心地忽略(由this bug跟踪)。

您正在构建的SampleScene实际上可能是空的,换句话说,没有内容。最好尝试构建并部署位于 Assets \ MixedRealityToolkit.Examples \ Demos \ HandTracking \ Scenes \ HandInteractionExamples.unity 中的HandInteractionAllExample场景。

否则,您的步骤看起来正确。另请参见this answer,以获取有关如何使用MRTK v2构建UWP的说明。