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

Dev/spatial awareness updates (temp) #133

Merged
merged 8 commits into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 XRTK.WindowsMixedReality/Packages/com.xrtk.wmr/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~/"
}
]
}
}
4 changes: 2 additions & 2 deletions XRTK.WindowsMixedReality/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"url": "https://packages.unity.com"
},
"com.xrtk.core": {
"version": "0.2.12",
"version": "0.2.13-preview.2",
"depth": 1,
"source": "registry",
"dependencies": {
Expand All @@ -108,7 +108,7 @@
"depth": 0,
"source": "embedded",
"dependencies": {
"com.xrtk.core": "0.2.12",
"com.xrtk.core": "0.2.13-preview.2",
"com.unity.xr.windowsmr.metro": "4.2.3"
}
},
Expand Down
Loading