From d3dac29eb4e483d32648c32e316122877992b0aa Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Fri, 7 May 2021 14:24:12 -0400 Subject: [PATCH] Dev/spatial awareness updates (temp) (#133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Boundary data provider now returns BoundaryVisibility.Unknown * intermediate step before native implementation * updated packages * updated package dependencies * updated player settings Co-authored-by: Dino Fejzagić --- .../WindowsMixedRealitySpatialMeshObserver.cs | 8 ++++---- package.json | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Runtime/Providers/SpatialAwarenessSystem/SpatialObservers/WindowsMixedRealitySpatialMeshObserver.cs b/Runtime/Providers/SpatialAwarenessSystem/SpatialObservers/WindowsMixedRealitySpatialMeshObserver.cs index d105c47..9315533 100644 --- a/Runtime/Providers/SpatialAwarenessSystem/SpatialObservers/WindowsMixedRealitySpatialMeshObserver.cs +++ b/Runtime/Providers/SpatialAwarenessSystem/SpatialObservers/WindowsMixedRealitySpatialMeshObserver.cs @@ -152,7 +152,7 @@ private async void SurfaceObserver_OnSurfaceChanged(SurfaceId surfaceId, Surface // If we're adding or updating a mesh if (changeType != SurfaceChange.Removed) { - var spatialMeshObject = await RequestSpatialMeshObject(surfaceId.handle); + var spatialMeshObject = await RequestSpatialMeshObject(new Guid(surfaceId.handle.ToString())); spatialMeshObject.GameObject.name = $"SpatialMesh_{surfaceId.handle.ToString()}"; var worldAnchor = spatialMeshObject.GameObject.EnsureComponent(); var surfaceData = new SurfaceData(surfaceId, spatialMeshObject.Filter, worldAnchor, spatialMeshObject.Collider, 1000 * (int)MeshLevelOfDetail, true); @@ -171,7 +171,7 @@ void OnDataReady(SurfaceData cookedData, bool outputWritten, float elapsedCookTi return; } - if (!SpatialMeshObjects.TryGetValue(cookedData.id.handle, out var meshObject)) + if (!SpatialMeshObjects.TryGetValue(new Guid(cookedData.id.handle.ToString()), out var meshObject)) { // Likely it was removed before data could be cooked. return; @@ -221,7 +221,7 @@ void OnDataReady(SurfaceData cookedData, bool outputWritten, float elapsedCookTi } } } - else if (SpatialMeshObjects.TryGetValue(surfaceId.handle, out var meshObject)) + else if (SpatialMeshObjects.TryGetValue(new Guid(surfaceId.handle.ToString()), out var meshObject)) { RaiseMeshRemoved(meshObject); } @@ -231,4 +231,4 @@ void OnDataReady(SurfaceData cookedData, bool outputWritten, float elapsedCookTi #endif // UNITY_WSA } -} \ No newline at end of file +} diff --git a/package.json b/package.json index ee56b89..6e21f69 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "mixed", "reality" ], - "version": "0.2.7", + "version": "0.2.8", "unity": "2019.4", "license": "MIT", "repository": { @@ -19,7 +19,7 @@ }, "author": "XRTK Team (https://github.com/XRTK)", "dependencies": { - "com.xrtk.core": "0.2.12", + "com.xrtk.core": "0.2.13-preview.2", "com.unity.xr.windowsmr.metro": "4.2.3" }, "profiles": [ @@ -28,4 +28,4 @@ "path": "Profiles~/" } ] -} +} \ No newline at end of file