Skip to content

Commit 1794176

Browse files
author
David Kline (ANALOG)
committed
pr feedback and panel text updates
1 parent a0d0b26 commit 1794176

File tree

7 files changed

+42
-43
lines changed

7 files changed

+42
-43
lines changed

Assets/MixedRealityToolkit-Examples/Demos/Boundary/Scenes/BoundaryVisualization.unity

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -164,22 +164,12 @@ Prefab:
164164
- target: {fileID: 114995780653097258, guid: cf1e39a641f010e42a8168c9737d1803,
165165
type: 2}
166166
propertyPath: m_Text
167-
value: 'This scene demonstrates visualizing the boundary geometry and a rectangular
168-
playspace inscribed within those bounds.
169-
170-
171-
172-
Displays spheres that indicate areas within and outside of the boundary geometry.
173-
174-
175-
176-
Visualizes the inscribed rectangular play area. This visualization can be
177-
toggled on and off in the inspector and from script.
178-
179-
180-
181-
Visualizes the floor. This visualization can be toggled on and off in the
182-
inspector and from script.'
167+
value: "This scene demonstrates visualizing the boundary geometry and a rectangular
168+
playspace inscribed within those bounds.\n\n\nContols the visualization of
169+
the user's configured boundary, including spheres that indicate the shape
170+
of the space.\n\n\n Instructs the Boundary System to show or hide the
171+
floor.\n\n\n\n Instructs the Boundary System to show or hide a rectanglular
172+
representation of the user's Play Area."
183173
objectReference: {fileID: 0}
184174
- target: {fileID: 114713125240876806, guid: cf1e39a641f010e42a8168c9737d1803,
185175
type: 2}
@@ -196,12 +186,12 @@ Prefab:
196186
- target: {fileID: 114121190672569774, guid: cf1e39a641f010e42a8168c9737d1803,
197187
type: 2}
198188
propertyPath: m_Text
199-
value: PlayAreaVisualizer.cs
189+
value: ' Show Floor'
200190
objectReference: {fileID: 0}
201191
- target: {fileID: 114186135864427680, guid: cf1e39a641f010e42a8168c9737d1803,
202192
type: 2}
203193
propertyPath: m_Text
204-
value: FloorPlaneVisualizer.cs
194+
value: ' Show Play Area'
205195
objectReference: {fileID: 0}
206196
- target: {fileID: 224849082003076088, guid: cf1e39a641f010e42a8168c9737d1803,
207197
type: 2}
@@ -369,6 +359,8 @@ MonoBehaviour:
369359
m_Script: {fileID: 11500000, guid: 647fd3dd3cb11e749850897a69f040db, type: 3}
370360
m_Name:
371361
m_EditorClassIdentifier:
362+
showFloor: 1
363+
showPlayArea: 1
372364
--- !u!1 &1229001241
373365
GameObject:
374366
m_ObjectHideFlags: 0

Assets/MixedRealityToolkit-SDK/Features/Boundary/System/MixedRealityBoundarySystem.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ public bool ShowFloor
214214
GetFloorVisualization();
215215
}
216216

217-
currentFloorPlane?.SetActive(value);
217+
if (currentFloorPlane != null)
218+
{
219+
currentFloorPlane.SetActive(value);
220+
}
218221

219222
RaiseBoundaryVisualizationChanged();
220223
}
@@ -238,7 +241,10 @@ public bool ShowPlayArea
238241
GetPlayAreaVisualization();
239242
}
240243

241-
currentPlayArea?.SetActive(value);
244+
if (currentPlayArea != null)
245+
{
246+
currentPlayArea.SetActive(value);
247+
}
242248

243249
RaiseBoundaryVisualizationChanged();
244250
}
@@ -258,7 +264,7 @@ public bool ShowPlayArea
258264
public float? FloorHeight { get; private set; } = null;
259265

260266
/// <inheritdoc/>
261-
public bool Contains(Vector3 location, UnityEngine.Experimental.XR.Boundary.Type boundaryType = UnityEngine.Experimental.XR.Boundary.Type.TrackedArea)
267+
public bool Contains(Vector3 location, Boundary.Type boundaryType = Boundary.Type.TrackedArea)
262268
{
263269
if (!EdgeUtilities.IsValidPoint(location))
264270
{
@@ -285,15 +291,15 @@ public bool Contains(Vector3 location, UnityEngine.Experimental.XR.Boundary.Type
285291
// Boundary coordinates are always "on the floor"
286292
Vector2 point = new Vector2(location.x, location.z);
287293

288-
if (boundaryType == UnityEngine.Experimental.XR.Boundary.Type.PlayArea)
294+
if (boundaryType == Boundary.Type.PlayArea)
289295
{
290296
// Check the inscribed rectangle.
291297
if (rectangularBounds != null)
292298
{
293299
return rectangularBounds.IsInsideBoundary(point);
294300
}
295301
}
296-
else if (boundaryType == UnityEngine.Experimental.XR.Boundary.Type.TrackedArea)
302+
else if (boundaryType == Boundary.Type.TrackedArea)
297303
{
298304
// Check the geometry
299305
return EdgeUtilities.IsInsideBoundary(Bounds, point);
@@ -365,7 +371,6 @@ public GameObject GetFloorVisualization()
365371
{
366372
if (currentFloorPlane != null)
367373
{
368-
// We already have a floor plane.
369374
return currentFloorPlane;
370375
}
371376

Assets/MixedRealityToolkit-SDK/Profiles/DefaultMixedRealityBoundaryVisualizationProfile.asset

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ MonoBehaviour:
1111
m_Script: {fileID: 11500000, guid: 8989e381a7c097840b2d40378a63497a, type: 3}
1212
m_Name: DefaultMixedRealityBoundaryVisualizationProfile
1313
m_EditorClassIdentifier:
14-
boundaryHeight: 3
1514
playAreaMaterial: {fileID: 2100000, guid: 30d693ff62c571241b431ef4e206b09a, type: 2}
1615
trackedAreaMaterial: {fileID: 2100000, guid: 1ab3a050711c97243a200ca653272343, type: 2}
1716
floorPlaneMaterial: {fileID: 2100000, guid: e106645f46550d54bacf6c82811c99e6, type: 2}
18-
floorPlaneScale: {x: 5, y: 5, z: 1}
17+
floorPlaneScale: {x: 3, y: 3, z: 1}

Assets/MixedRealityToolkit/_Core/Definitions/MixedRealityConfigurationProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public SystemType BoundarySystemSystemType
206206
private float boundaryHeight = 3.0f;
207207

208208
/// <summary>
209-
/// The approximate height of the play space, in meters.
209+
/// The developer defined height of the boundary, in meters.
210210
/// </summary>
211211
/// <remarks>
212212
/// The BoundaryHeight property is used to create a three dimensional volume for the play space.

Assets/MixedRealityToolkit/_Core/EventDatum/Boundary/BoundaryEventData.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace Microsoft.MixedReality.Toolkit.Internal.EventDatum.Boundary
1111
/// </summary>
1212
public class BoundaryEventData : GenericBaseEventData
1313
{
14-
/// <summary>
15-
/// Is the ceiling being visualized by the boundary system.
16-
/// </summary>
17-
/// <remarks>
18-
/// The boundary system defines the ceiling as a plane set at <see cref="IMixedRealityBoundarySystem.BoundaryHeight"/> above the floor.
19-
/// </remarks>
14+
///// <summary>
15+
///// Is the ceiling being visualized by the boundary system.
16+
///// </summary>
17+
///// <remarks>
18+
///// The boundary system defines the ceiling as a plane set at <see cref="IMixedRealityBoundarySystem.BoundaryHeight"/> above the floor.
19+
///// </remarks>
2020
// todo: coming in Beta
2121
// public bool IsCeilingVisualized { get; private set; }
2222

@@ -30,15 +30,15 @@ public class BoundaryEventData : GenericBaseEventData
3030
/// </summary>
3131
public bool IsPlayAreaVisualized { get; private set; }
3232

33-
/// <summary>
34-
/// Is the tracked area being visualized by the boundary system.
35-
/// </summary>
33+
///// <summary>
34+
///// Is the tracked area being visualized by the boundary system.
35+
///// </summary>
3636
// todo: coming in Beta
3737
// public bool IsTrackedAreaVisualized { get; private set; }
3838

39-
/// <summary>
40-
/// Are the boundary walls being visualized by the boundary system.
41-
/// </summary>
39+
///// <summary>
40+
///// Are the boundary walls being visualized by the boundary system.
41+
///// </summary>
4242
// todo: coming in Beta
4343
// public bool AreBoundaryWallsVisualized { get; private set; }
4444

Assets/MixedRealityToolkit/_Core/Inspectors/Profiles/MixedRealityBoundaryVisualizationProfileInspector.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public override void OnInspectorGUI()
3838
EditorGUILayout.HelpBox("Boundary visualizations can help users stay oriented and comfortable in the experience.", MessageType.Info);
3939
EditorGUILayout.Space();
4040

41+
if (!CheckMixedRealityManager())
42+
{
43+
return;
44+
}
45+
4146
serializedObject.Update();
4247

4348
GUILayout.Space(12f);

Assets/MixedRealityToolkit/_Core/Inspectors/Profiles/MixedRealityConfigurationProfileInspector.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ public class MixedRealityConfigurationProfileInspector : MixedRealityBaseConfigu
1515
{
1616
private static readonly GUIContent TargetScaleContent = new GUIContent("Target Scale:");
1717
private static readonly GUIContent NewProfileContent = new GUIContent("+", "Create New Profile");
18-
private static readonly GUIContent BoundaryHeightContent = new GUIContent("Boundary Height:");
19-
private static readonly GUIContent BoundaryVisualizationProfileContent = new GUIContent("Boundary Visualization Profile");
2018

2119
// Experience properties
2220
private SerializedProperty targetExperienceScale;
@@ -190,8 +188,8 @@ public override void OnInspectorGUI()
190188
// Boundary settings depend on the experience scale
191189
if (scale == ExperienceScale.Room)
192190
{
193-
EditorGUILayout.PropertyField(boundaryHeight, BoundaryHeightContent);
194-
EditorGUILayout.PropertyField(boundaryVisualizationProfile, BoundaryVisualizationProfileContent);
191+
EditorGUILayout.PropertyField(boundaryHeight);
192+
RenderProfile(boundaryVisualizationProfile);
195193
}
196194
else
197195
{

0 commit comments

Comments
 (0)