microsoft / MixedReality-SceneUnderstanding-Samples

MIT License
52 stars 20 forks source link

'WindowsMREnvironment' does not exist in the namespace 'UnityEngine.XR.WindowsMR' #35

Open ChiaraLoca opened 1 year ago

ChiaraLoca commented 1 year ago

Good morning, I tried to download the code but it gives me this error.

Assets\SceneUnderstanding\Core\Understanding\Scripts\SceneUnderstandingManager.cs(1360,167): error CS0234: The type or namespace name 'WindowsMREnvironment' does not exist in the namespace 'UnityEngine.XR.WindowsMR' (are you missing an assembly reference?)

How can I solve it?

demisquare commented 1 year ago

I managed to solve this error just changing at SceneUnderstandingManager.cs(1360,167) from:

Windows.Perception.Spatial.SpatialCoordinateSystem unityCoordinateSystem = Windows.Perception.Spatial.SpatialCoordinateSystem.FromNativePtr(UnityEngine.XR.WindowsMR.WindowsMREnvironment.OriginSpatialCoordinateSystem);

to:

Windows.Perception.Spatial.SpatialCoordinateSystem unityCoordinateSystem = null;

I'm using Unity 2021.3.8f1