MicrosoftEdge / WebView2Samples

Microsoft Edge WebView2 samples
830 stars 460 forks source link

Hololens 2 Completed Sample Crashes to Shell Environment on Launch #218

Closed ARGs-code closed 8 months ago

ARGs-code commented 8 months ago

I downloaded the Completed Hololens 2 Sample App from this Repo. I used the Mixed Reality Features tool to restore all features in the project per the instructions. Loaded the application into the Unity Editor targetting UWP Platform. Unity 2021.3.31f1.

On Loading into the Unity Editor see the following errors:

Problem detected while importing the Prefab file: 'Packages/com.microsoft.mixedreality.toolkit.foundation/Providers/Oculus/XRSDK/MRTK-Quest/Prefabs/MRTK-Quest_LocalAvatar.prefab'.
The file might be corrupt or have missing nested Prefabs. See details below.
Errors:
    Prefab instance problem: MRTK-Quest_LocalAvatar (Missing Prefab with guid: 84c8b8609f9bb434eaf5248f17ff1293)

Problem detected while importing the Prefab file: 'Packages/com.microsoft.mixedreality.toolkit.foundation/Providers/Oculus/XRSDK/MRTK-Quest/Prefabs/MRTK-Quest_HandsPrefab.prefab'.
The file might be corrupt or have missing nested Prefabs. See details below.
Errors:
    Prefab instance problem: MRTK-Quest_HandsPrefab (Missing Prefab with guid: 835e735ca71bf78459fb2cababd74112)

Problem detected while importing the Prefab file: 'Packages/com.microsoft.mixedreality.toolkit.foundation/Providers/Oculus/XRSDK/MRTK-Quest/Prefabs/MRTK-Quest_OVRCameraRig.prefab'.
The file might be corrupt or have missing nested Prefabs. See details below.
Errors:
    Prefab instance problem: MRTK-Quest_OVRCameraRig (Missing Prefab with guid: 126d619cf4daa52469682f85c1378b4a)
    Prefab instance problem: OVRControllerPrefab (Missing Prefab with guid: d9809c5e8418bb047bf2c8ba1d1a2cec). 2 instances are missing the same Prefab

Despite these errors everything works as expected in the Unity Editor. No issues or errors on run.

Built the application to a Visual Studio Solution, targetted ARM64/Release and deployed to my Hololens 2.

On Launching the application it crashes back to the Mixed Reality Shell Environment.

The Unity Log states the following issues before ending abruptly due to the crash:

The referenced script (Unknown) on this Behaviour is missing!
The referenced script on this Behaviour (Game Object '<null>') is missing!
A scripted object (probably Microsoft.MixedReality.Toolkit.XRSDK.Oculus.Input.OculusXRSDKDeviceManagerProfile?) has a different serialization layout when loading. (Read 72 bytes but expected 108 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

Have not touched / changed anything in the project. Only completed the steps as described above.

Unity Log Attached for reference

WebViewSampleLog.log

ARGs-code commented 8 months ago

Ran into a similar issue with MRTK3 basic projects.

Issue appears to be that these projects are using an old version of the Unity Input System and are targetting .net 2.1

To fix this I had to update the Unity Input System and change the .net from 2.1 to .net framework. Neither of these steps are detailed in the documentation.

ARGs-code commented 8 months ago

Closing this as I figured it out. But still frustrating that following the documentation leads to crashes.

michaelfarnsworth commented 8 months ago

Glad you got it figured out. I'll see about getting the documentation updated.