Skip to content

Commit e761ae3

Browse files
committed
added bool property HasMeshSectors which shows whether any mesh has been scanned
1 parent 78e656b commit e761ae3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Assets/HoloToolkit/SpatialUnderstanding/Scripts/SpatialUnderstanding.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ public bool AllowSpatialUnderstanding
5050
return true;
5151
}
5252
}
53+
54+
/// <summary>
55+
/// Has any mesh sectors been scanned
56+
/// </summary>
57+
public bool HasMeshSectors { get { return UnderstandingCustomMesh.HasMeshSectors; } }
58+
5359
/// <summary>
5460
/// Reference to the SpatialUnderstandingDLL class (wraps the understanding dll functions).
5561
/// </summary>
@@ -250,7 +256,7 @@ private void Update_Scan(float deltaTime)
250256

251257
// If it's done, finish up
252258
if ((ScanState == ScanStates.Finishing) &&
253-
(scanDone) &&
259+
(scanDone) &&
254260
(!UnderstandingCustomMesh.IsImportActive) &&
255261
(UnderstandingCustomMesh != null))
256262
{

Assets/HoloToolkit/SpatialUnderstanding/Scripts/SpatialUnderstandingCustomMesh.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ private float MaxFrameTimeInSeconds
3939
public bool CreateMeshColliders = true;
4040

4141
private bool drawProcessedMesh = true;
42+
4243
// Properties
4344
/// <summary>
4445
/// Controls rendering of the mesh. This can be set by the user to hide or show the mesh.
@@ -59,6 +60,11 @@ public bool DrawProcessedMesh
5960
}
6061
}
6162

63+
/// <summary>
64+
/// Has any mesh sectors been scanned
65+
/// </summary>
66+
public bool HasMeshSectors { get { return meshSectors != null && meshSectors.Count > 0; } }
67+
6268
/// <summary>
6369
/// Indicates if the previous import is still being processed.
6470
/// </summary>

0 commit comments

Comments
 (0)