Unable to register IMixedRealitySpatialAwarenessObserver data provider (Windows Mixed Reality Spatial Mesh Observer) because the value of concreteType is null.
Describe the bug
Hi! , I'm trying to use spatial awareness in my Hololens2 project. Able to scan the environment as expected , but getting a warning Unable to register IMixedRealitySpatialAwarenessObserver data provider (Windows Mixed Reality Spatial Mesh Observer) because the value of concreteType is null. This may be caused by code being stripped during linking. The link.xml file in the MixedRealityToolkit.Generated folder is used to control code preservation. More information can be found at https://docs.unity3d.com/Manual/ManagedCodeStripping.html.
every time when I try to start spatial mesh scanning in my project which is configured with GenericXRSDKSpatialMeshObserver and OpenXRSpatialMeshObserver observers for Mixed Reality Spatial Awareness system profile. Also , link.xml file has <assembly fullname="Microsoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem" preserve="all" ignoreIfMissing="1" />.
Spatial Scanning happens as expected , but I worry about the warning logged. What might be the reason for it?
To reproduce
I tried out MRTK's example scene too for spatial awareness "Assets/MRTK/Examples/Demos/SpatialAwareness/Scenes/SpatialAwarenessMeshDemo.unity" , I'm getting the same warning here also.
Your setup
- Unity Version 2020.3.20f1
- MRTK Version 2.7.3
Target platform
- HoloLens 2
Ah yes, this is almost definitely the legacy version of the spatial mesh observer. The log is a bit confusing. Basically, by default, we've included a selection of both legacy and XR SDK providers in the default MRTK profiles. This sometimes leads to logs like this, where you're running on a version of Unity where legacy XR doesn't exist, so we don't include the legacy providers in the build. This should be a benign log, especially as you've said you're able to get spatial meshing working regardless.
Thanks @keveleigh for your reply. Is there a way to get rid of that warning in the project?
@srinjoym can you check if this "benign log message" is reproducible
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!