microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Spatial Object Mesh Observer can't be deployed to HoloLens 2 #8067

Closed jbienzms closed 9 months ago

jbienzms commented 4 years ago

Describe the bug

The MRTK document Configuring Observers for Editor suggests using Spatial Object Mesh Observer for testing spatial awareness while in the editor. This works, however when the application is deployed to HoloLens 2 the following error is produced:

A scripted object (probably Microsoft.MixedReality.Toolkit.SpatialObjectMeshObserver.SpatialObjectMeshObserverProfile?) has a different serialization layout when loading. (Read 64 bytes but expected 152 bytes) Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

(Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializedFile.cpp Line: 2136)

Expected behavior

My expectation is that any service in MRTK that is designed to support the editing experience would not get deployed to the final device. If an editor-specific service is deployed to the device, I would expect that it would remain dormant and would not generate errors.

Your setup (please complete the following information)

Target platform (please complete the following information)

jbienzms commented 4 years ago

@davidkline-ms is this one you could take a look at? I know you were working on this system at one point.

wiwei commented 4 years ago

I'm fixing this

wiwei commented 4 years ago

Ah sent too soon, I'm fixing this in a way that should hopefully prevent any of these errors from a happening again in the future as well

sidoverflow commented 4 years ago

facing the same error, it seems to be deployed to the device only on a Release build though. I don't get the error while deploying a Debug build.

Zee2 commented 3 years ago

8072 was closed but not resolved. @RogPodge you interacted with a recent issue involving serialization of these profiles. Is this fixed now?

RogPodge commented 3 years ago

Unfortunately this is not yet fixed and is probably on hold for a bit. The error itself has does not impact or cause any functional issues on runtime to out knowledge, and properly squashing it would take quite a bit of effort to refactor our folders. Looking to revisit this during early 3.0 timeframe.

stale[bot] commented 2 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!