Skip to content

Commit da0592c

Browse files
moved boundary height into boundary visualization profile.
removed teleport duration from main config profile, as it's currently unimplemented anyway
1 parent 4c5615b commit da0592c

File tree

7 files changed

+31
-41
lines changed

7 files changed

+31
-41
lines changed

Assets/MixedRealityToolkit-SDK/Features/Boundary/MixedRealityBoundaryManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private void InitializeInternal()
4040
boundaryEventData = new BoundaryEventData(EventSystem.current);
4141

4242
Scale = MixedRealityManager.Instance.ActiveProfile.TargetExperienceScale;
43-
BoundaryHeight = MixedRealityManager.Instance.ActiveProfile.BoundaryHeight;
43+
BoundaryHeight = MixedRealityManager.Instance.ActiveProfile.BoundaryVisualizationProfile.BoundaryHeight;
4444

4545
SetTrackingSpace();
4646
CalculateBoundaryBounds();

Assets/MixedRealityToolkit-SDK/Features/Teleportation/MixedRealityTeleportManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ private void InitializeInternal()
7474
}
7575
#endif // UNITY_EDITOR
7676

77-
TeleportDuration = MixedRealityManager.Instance.ActiveProfile.TeleportDuration;
7877
teleportEventData = new TeleportEventData(EventSystem.current);
7978
}
8079

Assets/MixedRealityToolkit-SDK/Profiles/DefaultMixedRealityConfigurationProfile.asset

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ MonoBehaviour:
1212
m_Name: DefaultMixedRealityConfigurationProfile
1313
m_EditorClassIdentifier:
1414
initialManagerTypes:
15-
- reference: Microsoft.MixedReality.Toolkit.SDK.Input.MixedRealityInputManager,
15+
- reference: Microsoft.MixedReality.Toolkit.SDK.Teleportation.MixedRealityTeleportManager,
1616
Microsoft.MixedReality.Toolkit.SDK
1717
- reference: Microsoft.MixedReality.Toolkit.SDK.BoundarySystem.MixedRealityBoundaryManager,
1818
Microsoft.MixedReality.Toolkit.SDK
19+
- reference: Microsoft.MixedReality.Toolkit.SDK.Input.MixedRealityInputManager,
20+
Microsoft.MixedReality.Toolkit.SDK
1921
targetExperienceScale: 3
2022
enableCameraProfile: 1
2123
cameraProfile: {fileID: 11400000, guid: 8089ccfdd4494cd38f676f9fc1f46a04, type: 2}
@@ -28,7 +30,6 @@ MonoBehaviour:
2830
boundarySystemType:
2931
reference: Microsoft.MixedReality.Toolkit.SDK.BoundarySystem.MixedRealityBoundaryManager,
3032
Microsoft.MixedReality.Toolkit.SDK
31-
boundaryHeight: 3
3233
boundaryVisualizationProfile: {fileID: 11400000, guid: 6d28cce596b44bd3897ca86f8b24e076,
3334
type: 2}
3435
enableTeleportSystem: 1

Assets/MixedRealityToolkit/_Core/Definitions/BoundarySystem/MixedRealityBoundaryVisualizationProfile.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ namespace Microsoft.MixedReality.Toolkit.Core.Definitions.BoundarySystem
1212
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Mixed Reality Boundary Visualization Profile", fileName = "MixedRealityBoundaryVisualizationProfile", order = (int)CreateProfileMenuItemIndices.BoundaryVisualization)]
1313
public class MixedRealityBoundaryVisualizationProfile : ScriptableObject
1414
{
15+
[SerializeField]
16+
[Tooltip("The approximate height of the play space, in meters.")]
17+
private float boundaryHeight = 3.0f;
18+
19+
/// <summary>
20+
/// The developer defined height of the boundary, in meters.
21+
/// </summary>
22+
/// <remarks>
23+
/// The BoundaryHeight property is used to create a three dimensional volume for the play space.
24+
/// </remarks>
25+
public float BoundaryHeight => boundaryHeight;
26+
1527
#region Floor settings
1628

1729
[SerializeField]

Assets/MixedRealityToolkit/_Core/Definitions/MixedRealityConfigurationProfile.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,6 @@ public SystemType BoundarySystemSystemType
149149
private set { boundarySystemType = value; }
150150
}
151151

152-
[SerializeField]
153-
[Tooltip("The approximate height of the play space, in meters.")]
154-
private float boundaryHeight = 3.0f;
155-
156-
/// <summary>
157-
/// The developer defined height of the boundary, in meters.
158-
/// </summary>
159-
/// <remarks>
160-
/// The BoundaryHeight property is used to create a three dimensional volume for the play space.
161-
/// </remarks>
162-
public float BoundaryHeight => boundaryHeight;
163-
164152
[SerializeField]
165153
[Tooltip("Profile for wiring up boundary visualization assets.")]
166154
private MixedRealityBoundaryVisualizationProfile boundaryVisualizationProfile;
@@ -201,19 +189,6 @@ public SystemType TeleportSystemSystemType
201189
private set { teleportSystemType = value; }
202190
}
203191

204-
[SerializeField]
205-
[Tooltip("The duration of the teleport in seconds.")]
206-
private float teleportDuration = 0.25f;
207-
208-
/// <summary>
209-
/// The duration of the teleport in seconds.
210-
/// </summary>
211-
public float TeleportDuration
212-
{
213-
get { return teleportDuration; }
214-
set { teleportDuration = value; }
215-
}
216-
217192
[SerializeField]
218193
[Tooltip("All the additional non-required systems, features, and managers registered with the Mixed Reality Manager.")]
219194
private MixedRealityRegisteredComponentsProfile registeredComponentsProfile = null;

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using Microsoft.MixedReality.Toolkit.Core.Definitions.BoundarySystem;
5+
using Microsoft.MixedReality.Toolkit.Core.Definitions.Utilities;
56
using Microsoft.MixedReality.Toolkit.Core.Managers;
67
using UnityEditor;
78
using UnityEngine;
@@ -11,6 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Core.Inspectors.Profiles
1112
[CustomEditor(typeof(MixedRealityBoundaryVisualizationProfile))]
1213
public class MixedRealityBoundaryVisualizationProfileInspector : MixedRealityBaseConfigurationProfileInspector
1314
{
15+
private SerializedProperty boundaryHeight;
1416
private SerializedProperty showFloor;
1517
private SerializedProperty floorMaterial;
1618
private SerializedProperty floorScale;
@@ -38,6 +40,8 @@ private void OnEnable()
3840
return;
3941
}
4042

43+
boundaryHeight = serializedObject.FindProperty("boundaryHeight");
44+
4145
showFloor = serializedObject.FindProperty("showFloor");
4246
floorMaterial = serializedObject.FindProperty("floorMaterial");
4347
floorScale = serializedObject.FindProperty("floorScale");
@@ -71,8 +75,16 @@ public override void OnInspectorGUI()
7175
EditorGUILayout.Space();
7276
EditorGUILayout.LabelField("Boundary Visualization Options", EditorStyles.boldLabel);
7377
EditorGUILayout.HelpBox("Boundary visualizations can help users stay oriented and comfortable in the experience.", MessageType.Info);
78+
// Boundary settings depend on the experience scale
79+
if (MixedRealityManager.Instance.ActiveProfile.TargetExperienceScale != ExperienceScale.Room)
80+
{
81+
EditorGUILayout.Space();
82+
EditorGUILayout.HelpBox("Boundary visualization is only supported in Room scale experiences.", MessageType.Warning);
83+
}
7484
EditorGUILayout.Space();
7585
serializedObject.Update();
86+
EditorGUILayout.PropertyField(boundaryHeight);
87+
EditorGUILayout.Space();
7688
EditorGUILayout.LabelField("Floor Settings:", EditorStyles.boldLabel);
7789
EditorGUILayout.PropertyField(showFloor, showContent);
7890
EditorGUILayout.PropertyField(floorMaterial, materialContent);

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

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ public class MixedRealityConfigurationProfileInspector : MixedRealityBaseConfigu
2626
// Boundary system properties
2727
private SerializedProperty enableBoundarySystem;
2828
private SerializedProperty boundarySystemType;
29-
private SerializedProperty boundaryHeight;
3029
// Teleport system properties
3130
private SerializedProperty enableTeleportSystem;
3231
private SerializedProperty teleportSystemType;
33-
private SerializedProperty teleportDuration;
3432
private SerializedProperty boundaryVisualizationProfile;
3533

3634
private SerializedProperty registeredComponentsProfile;
@@ -87,11 +85,9 @@ private void OnEnable()
8785
// Boundary system configuration
8886
enableBoundarySystem = serializedObject.FindProperty("enableBoundarySystem");
8987
boundarySystemType = serializedObject.FindProperty("boundarySystemType");
90-
boundaryHeight = serializedObject.FindProperty("boundaryHeight");
9188
// Teleport system configuration
9289
enableTeleportSystem = serializedObject.FindProperty("enableTeleportSystem");
9390
teleportSystemType = serializedObject.FindProperty("teleportSystemType");
94-
teleportDuration = serializedObject.FindProperty("teleportDuration");
9591
boundaryVisualizationProfile = serializedObject.FindProperty("boundaryVisualizationProfile");
9692
registeredComponentsProfile = serializedObject.FindProperty("registeredComponentsProfile");
9793
}
@@ -166,25 +162,20 @@ public override void OnInspectorGUI()
166162
EditorGUILayout.LabelField("Boundary System Settings", EditorStyles.boldLabel);
167163
EditorGUILayout.PropertyField(enableBoundarySystem);
168164
EditorGUILayout.PropertyField(boundarySystemType);
165+
changed |= RenderProfile(boundaryVisualizationProfile);
169166

170167
// Boundary settings depend on the experience scale
171-
if (scale == ExperienceScale.Room)
172-
{
173-
EditorGUILayout.PropertyField(boundaryHeight);
174-
changed |= RenderProfile(boundaryVisualizationProfile);
175-
}
176-
else
168+
if (scale != ExperienceScale.Room)
177169
{
178170
GUILayout.Space(6f);
179-
EditorGUILayout.HelpBox("Boundary visualization is only supported in Room scale experiences.", MessageType.Info);
171+
EditorGUILayout.HelpBox("Boundary visualization is only supported in Room scale experiences.", MessageType.Warning);
180172
}
181173

182174
// Teleport System configuration
183175
GUILayout.Space(12f);
184176
EditorGUILayout.LabelField("Teleport System Settings", EditorStyles.boldLabel);
185177
EditorGUILayout.PropertyField(enableTeleportSystem);
186178
EditorGUILayout.PropertyField(teleportSystemType);
187-
EditorGUILayout.PropertyField(teleportDuration);
188179

189180
GUILayout.Space(12f);
190181
changed |= RenderProfile(registeredComponentsProfile);

0 commit comments

Comments
 (0)