Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Dev/spatial awareness updates (temp) (#133)
Browse files Browse the repository at this point in the history
* 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ć <[email protected]>
  • Loading branch information
StephenHodgson and FejZa authored May 7, 2021
1 parent c4eb3d3 commit d3dac29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<WorldAnchor>();
var surfaceData = new SurfaceData(surfaceId, spatialMeshObject.Filter, worldAnchor, spatialMeshObject.Collider, 1000 * (int)MeshLevelOfDetail, true);
Expand All @@ -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;
Expand Down Expand Up @@ -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);
}
Expand All @@ -231,4 +231,4 @@ void OnDataReady(SurfaceData cookedData, bool outputWritten, float elapsedCookTi

#endif // UNITY_WSA
}
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"mixed",
"reality"
],
"version": "0.2.7",
"version": "0.2.8",
"unity": "2019.4",
"license": "MIT",
"repository": {
Expand All @@ -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": [
Expand All @@ -28,4 +28,4 @@
"path": "Profiles~/"
}
]
}
}

0 comments on commit d3dac29

Please sign in to comment.