HoloLens 2开发常见问题汇总.docx
HoIoLens2开发常见问题汇总1、如果CG模型等仅在HoIoLens的一侧(左眼)显示怎么办问题:HoIoLens仅在一侧(左眼)显示CG模型等MRC(混合现实捕获)不显示特定的CG模型等(显示其他)原因:CG模型着色器不支持SinglePass渲染解决方案:ScenesInBuildAddOpenScenesPlatform1PC,Mac&LinuxStandaloneUniversalWindowsPlatformUniversalWindowsPlatformWTargetDeviceAnydeviceflAndroidArchitecture×64BuildTypeD3DProjecttQTuCSTargetSDKVersionLatestinstalledIvCIVDDMinimumPlatformVersion10.0.10240.0FiraPS4VisualStudioVersionLatestinstalledBuildandRunonLocalMachineiOSiosBuildconfigurationReleaseCopyReferences日XboxOneCopyPDBfiles窗WebGLDevelopmentBuildAutoconnectProfilerDeepProfilingSupportScriptDebuggingScriptsOnlyBuildCompressionMethodDefaultLearnaboutUnItyCloUdBUHdPlayerSettings.BuildBuiIdAndRun。ProjectSettingsAuOOEditorGraDbicsInouxManaQefPhvsicsPhvstes2DPtaverPresetManagerQuttlitvScrKXExecuUonOderTaqsandLaversTextMeshProTimeVFXXRPluainMenaoementPlayerDefaultIconDefauttCursorCursorHoispotSettingsforUniversalEndowsPQtformIconRsohttonandPresentationSplahlmgOtherSettingsPublishingSettingsXRSettingsMon<Texture20)SNetNon<TMu<2D)OBurXR«<tepfseatedndIVflOertie<j<nafuturvrwnofUnity.Umthenwu11<yXRPlbQirtSyMemn*tadYoucanfMMttr>gaforUnityXR人即SytfHnlfctSttmgundarXRPU9nMangmntDeprecatedSettingsVirtualReahtySuppoftdVirtualRealitySDKsWindowsMtxedRealityDepthFormatEnableDepthBufferSharing1>bitdepthStereoRenderingMode*WSAHolographicRemcMlngSupportedMulUPassOOwtMRMrqMrdUrtMtfiumgWSAHotodMultiPassngyassSinglePmsInstancedTextMeshPro也有类似情况TextMeshProForTextMeshProobjects,selecttheTMPGameObjecttoviewitintheinspector.UnderthematerialcomponentswitchtheshaderfortheassignedmaterialtousetheMRTKTextMeshProshader.2、MRTK着色器错误将MRTK导入到项目中可能会导致MRTK着色器错误。可能有多种因素,但是在此示例中,原因是管道不支持它。解决方案是删除管道或使用相应的管道。3、关于错误"Couldnotfindanysupportedvisualstudioinstallations”解决方法当我像往常一样尝试构建HoIoLens时,在Unity中出现了这样的错误。UniversalWindowsPlatformTargetDeviceHoIoLenSBuildType(D3DSDKLateStinstalledVisualStudioVersionNotinstalled11BuildandRunonLocalMachineCouldnotfindanysuppotedVisualStudioinstallations.CopyReferencesDebuggingUnityC#ProjectsDevelopmentBuildAutoconnectProfilerScriptsOnlyBuildCompressionMethodDefaultAlLearnaboutUnityCloudBuild匚BuildBuildAndRunJ当我用Unity查找时,2017.1.2f1没问题,2018.4.12F1错误,2018.3.0b7也出错,根据版本不同意味着什么?通过更新我使用的ViSUalStUdi。2017解决了该问题。我先尝试了更新,但可能已修复。如果你有相同的症状,请尝试*更新/修复,启动VisualStudio安装程序。4、忽略"ReferenceRewriterfoundsomeerrorswhilerunningwithcommand”构建MRTKv2时出现以下错误。参考重写器在运行命令"-target=TempStagingAreaDataManagedASSembly-CSharp.dll”时发现一些错误ConsoleaClearColhpsCl*ronPL.ErrorPuseEditor1''M.?8IReferencePewnterfoundsomeerrorswhilerunningwithcommand,-target=Temp'StagingAreaxDataXManaged.AsseError:heldSyftem.Numencs.Vector3Windows.PetCeption.PeopIe.HandMeshVertex:Pos«t)ondoesntexistintarget(Referencerewter:Error:eldSystem.Numerics.Vector3Windows.Perception1People1HandMeshvertexnPositjondeUnityEngine-DebugrLogEiTor(Object)1Referencerewnter:Error:eldSystem.Numencs.Vector3Windows.Perception.People.HandMeshVertex:PositiondeUnityEngine.Debug:LOgErrOr(ObjeCt)IReferencerewrrte:Error:fieldSystem.Numencs.Vector3Windows-Perception.People1HandMeshVertexiiNormaIdoUnityEngine.DebugcLogError(Object)QReferencerewnter:Etor:fieldSystem.NumencB-QuatemionWndows.Percepbon.PeopleJomtPose:OnentationdotUnityEngineQebUg:LogErrOr(Object)QReferencerewte:Error:eldSystem.Numenct.Vector3Windows.Percepton.PeopleJomtPose:Po«rtiondoesn'teUnityEngine.DebugiLogEiTor(Object)IReferencerewtet:Error:fieldSystem.Numerics.Vector3Windows.Perception.Spatial.SpabaIRay:0rigmdoesn'te>UnityEngine.Debug:LogError(Objed)QReferencerewrteError:fieldSystem.Numencs.Vector3Windows.Perception.Spatial.SpataIRay:directiondoen'lUnityEngine.Debu9:LogError(Object)ReferenceRewnterfoundsomeerrorswhilerunningwithcommand'-Urget*TempSUgngAeaDataManagedA*sembly-CShap.dll""-target三Temp'StagingAreaXDataXManagedMicrosoftMixedPeaIity.Toolkit.Service*.InputSystem.dl,-target三Temp.StagmgArea'DataManagedMicroioft-MixedReal(ty.Toolkit.Services.InputSimuIatJon.dll",-Urget=Temp'StagjngAreavDataYManaQedMicrosoft-MaedReaIity.Toolkit.Services.InputAnimation.dl-taget*TempStaQingAreakDataVManaged.Microsoft.MixedPeahty.Toolkit.Services.DiagnostiesSystem.dll'"-Urget-Temp.StagingAreaXDaUxManaged.Microtoft.MixedPeaIity.Toolkit-Servicef.CameraSystem.dl"-target三TernpStagmgAreaXDataXManagedMicrosoft-MixedReaIity.Toolkit.Services.BoundarySy5tem.dll"这似乎可以忽略。可以正常部署到HoIoLens05、关于设置MRTKV2.2的提示MRTKv2.2设置提示突然消失了。由于它显示在另一台PC上,这似乎是PC的问题。MRTKProjectConfiguratorApplyDefaultSettings?TheMixedRealityToolkitwouldliketoauto-applyusefulsettingstothisUnityprojectApply,LaterIgnore ModifyConfigurationsEnabledoptionswillbeappliedtotheproject.Disableditemsarealreadyproperlyconfigured.ProjectSettings EnableForceTextSerialization EnableVisiblemetafilesqEnableVRSupportedQSetSinglePassInstancedrenderingpathQSetDefaultSpatialAwarenessLayerBEnableMSBuiIdforUnityUWPCapabilitiesEnableMicrophoneCapabilityEnableInternetClientCapabilityqEnableSpatialPerceptionCapability如果选中此检杳,则提示显示似乎被跳过O Project SettingsAudio Editor Graphics InputMixed Reality Toolkit PhysicsPhysics 2D Player Preset ManagerQualityScript Execution OrderTags and Layers TextMesh ProTime VFXMixedRealityToolkit1.ockSDKprofilesRIgnoresettingspromptonsta*tupAuto-EnableUWPCapabilitiesIsscriptreloadinglocked?Runoptimalconfigurationanalysisonplay此设置似乎永久Unity编辑器,并且一旦使用MRTK忽略,它似乎就永久处于"忽略"状态。如果你实际是忽略此状态,选中"Runoptimalconfigurationanalysisonplay,oQHv*tYWtti*>f*as”MtaedRettyIooMtQr«>hrsWrHftQlrt5«/attn4*metSrtwtbtMroetfM?iAtfttYcZVWCHtcVOtoer9tEMz<AM>.>unp*tm4maef02,”*>tM*>9»5、t0ftlif!Oftr,7»64UrHrT4mSbMRTKA”l.01ltftSTheHMT,lbtt*Z(v*vum6tm*9三tvM5<vKrtO“而C*<-*fy*三*r,<aaaFHHntWMiZnratfDuaK3z&*4w11r*v<wurFrH<<Htm<t0CfMMVt,9,-VM”,”一49MF,XtO<*AMtSp<h>A4FnML4*r952Mfi4gH<v<yUW*C.*I*M.enoFbwMcC9<t*'vVFf*uMmY1w-C>.4Aawtfe(hmC4MMOOProjectSettings三AudioMixedRealityToolkitEditorGraphicsLockSDKprofiles歹InputIgnoresettingspromptonstartup7MixedRealityToolkitAuto-EnableUWPCapabilitiesPhysicsIsscriptreloadinglocked?Physics2DRunoptimalconfigurationanalysisonplay7PlayerPresetManagerQualityScriptExecutionOrderTagsandLayersTextMeshProTimeVFX再次取消选中它。0ProjectSettings=QAudioEditorGraphicsInputMixedRealityToolkit1.ockSDKprofilesIgnoresettingspromptonstartup7MixedRealityToolkitAuto-EnableUWPCapabilitiesnPhysicsPhysics2DPlayerPresetManagerQualityScriptExecutionOrderTagsandLayersTextMeshProTimeVFXIsscriptreloadinglocked?Runoptimalconfigurationanalysisonplayf=76、在H。IoLenS2中关闭PlN输入和视线调整当佩戴者从"设置"更改时,可以关闭启动时的PIN输入和视线调整。我认为仅此一项,在被多个人使用时将变得更加容易。对于启动时的PIN输入,请将"帐户-登录选项-要求登录的时间"设置为"无对于视线调整,将"系统-调整-自动确认执行视线调整"设置为"关"。但是,如果不调整视线,视线识别的准确性可能会下降,体验质量可能会下降,因此请根据内容的性质进行选择。请注意,如果HoIoLens2的操作系统版本旧,则可能不会显示视线调整关闭。在这种情况下,请执行WindoWSUpdateo7、使用UnityUWP(HoIoLens)构建(PUN)时发生错误怎么办Unity2019.4.2f1(可能在Unity2019之后发生)三Console三ClearCollapseClearonPlayClearonBuildErrorPauseEditorvQ0AO11618:11:21AssetsPhotoPhotonChatCodeChatAppSettings.cs(17,11):errorCS0246:Thetypeornamesa(18:11:21AssetsPhotonPhotonChatCodeChatChanel.cs(17,23):errorCS0246:Thetypeornamespat.18:11:21AssetsPhotonPhotonChatCodeChatChannel.cs(18,26):errorCS0246:Thetypeornamespac.18:11:21AssetsPhotonPhotonChatCodeChatClient.cs(19,23):errorCS0246:Thetypeornamespacea18:11:21AssetsPhotonPhotonChatCodeChatCIient.cs(20126):errorCS0246:Thetypeornamespace(卜18:11:21)AssetsPhotonPhotonChatCodeChatCIient.cs(16,11):errorCS0246:Thetypeornamespacet(,18:11:21AssetsPhotonPhotonChatCodeChatPeer.cs(19,23):errorCS0246:Thetypeornamespacen1A11911cotcPhtnPhtnnhatrtohatP04rrc9119VrrnrThaturunrnssetsPhotonPhotonChatCodeChatAppSettings.cs(17,11):errorCS0246:ThetypeornamespacenameExitGames'couldnotbefound(areyoumissingausingdirectiveoranassemblyreference?)原因由于默认值为NET,因此不会生成IL2CPP,并且会发生错误。似乎原因是自Unity2019以来,脚本后端的默认设置已从.NET更改为IL2CPPo i L3 2Ia。 08 AMt" Photon PhotonChat fit PhotonLIbs Metro> PhOWn3 Unity 3DSPhOUm3 UEty 30 PhotonSUmty 3D netstandard20 to WebSocket Changes-Iibrary A Pho<on3Unty3D 0 Poon3Unity30 Ph<on3 Unity 30 PhofonReaItime PtKMonUnityNetwcxkIngPhtHonNetwortc Iny- Doc umenttlo PhotonNetworkIng- DocunwnUtIo Scenes Packages, Photon3Unty3D Import SettingsGeneralAuto ReferenceJValidate ReferencesSelect platforms for pluginAny PlatfoonIr)CiUd PlatformsEditorStandaloneAndroid WSAPiayer/Platform settingsSDKScrlptingBdCkend Don't process PlAceholdefDefn Constraint*List Is Empty口Any SDKAny Scri pH ng Backendrmy JU.Oii, Any Scnpting Backend Dot NetSCPP解决方案:将"AssetsPhotonPhotonLibsMetro"中"Photon3Unity3D"的"PlatformSettingS"中的"ScriptingBackencT更改为"AnyScriptingBackend,o最后不要忘记点击'Apply'。现在构建就可以了。三Console:ClearCollapseClearonPlayClearonBuildErrorPauseEditorQOlo18:21:36Buildcompletedwitharesultof'Succeeded'in59seconds(59393ms)UnityEngine.GUIUtility:ProcessEvent(lnt32,IntPtr)