Skip to content

Commit f6f0f2e

Browse files
simplified boundscontrol types usage / added component menu entry and class description
1 parent 2a35028 commit f6f0f2e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Assets/MixedRealityToolkit.Examples/Experimental/Demos/UX/BoundsControl/Scripts/BoundsControlRuntimeExample.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Microsoft.MixedReality.Toolkit.Input;
55
using Microsoft.MixedReality.Toolkit.UI;
66
using Microsoft.MixedReality.Toolkit.Experimental.UI.BoundsControl;
7+
using Microsoft.MixedReality.Toolkit.Experimental.UI.BoundsControlTypes;
78
using Microsoft.MixedReality.Toolkit.Utilities;
89
using System.Collections;
910
using System.Text;
@@ -12,9 +13,9 @@
1213

1314
namespace Microsoft.MixedReality.Toolkit.Examples.Experimental.Demos
1415
{
16+
[AddComponentMenu("Scripts/MRTK/Experimental/Examples/BoundsControlRuntimeExample")]
1517
/// <summary>
16-
/// TODO: This demo probably needs to be adjusted
17-
/// Currently it's just a copy of BoundingBoxExampleTest
18+
/// This example script demonstrates various bounds control runtime configurations
1819
/// </summary>
1920
public class BoundsControlRuntimeExample : MonoBehaviour, IMixedRealitySpeechHandler
2021
{
@@ -67,7 +68,7 @@ private IEnumerator Sequence()
6768
SetStatus("Instantiate BoundsControl");
6869
boundsControl = cube.AddComponent<BoundsControl>();
6970
boundsControl.HideElementsInInspector = false;
70-
boundsControl.BoundsControlActivation = Toolkit.Experimental.UI.BoundsControlTypes.BoundsControlActivationType.ActivateOnStart;
71+
boundsControl.BoundsControlActivation = BoundsControlActivationType.ActivateOnStart;
7172
var mh = cube.AddComponent<ManipulationHandler>();
7273
yield return WaitForSpeechCommand();
7374

@@ -98,15 +99,15 @@ private IEnumerator Sequence()
9899
yield return WaitForSpeechCommand();
99100

100101
SetStatus("FlattenX");
101-
boundsControl.FlattenAxis = Toolkit.Experimental.UI.BoundsControlTypes.FlattenModeType.FlattenX;
102+
boundsControl.FlattenAxis = FlattenModeType.FlattenX;
102103
yield return WaitForSpeechCommand();
103104

104105
SetStatus("FlattenY");
105-
boundsControl.FlattenAxis = Toolkit.Experimental.UI.BoundsControlTypes.FlattenModeType.FlattenY;
106+
boundsControl.FlattenAxis = FlattenModeType.FlattenY;
106107
yield return WaitForSpeechCommand();
107108

108109
SetStatus("FlattenNone");
109-
boundsControl.FlattenAxis = Toolkit.Experimental.UI.BoundsControlTypes.FlattenModeType.DoNotFlatten;
110+
boundsControl.FlattenAxis = FlattenModeType.DoNotFlatten;
110111
yield return WaitForSpeechCommand();
111112

112113
SetStatus("ShowWireframe false");
@@ -170,7 +171,7 @@ private IEnumerator Sequence()
170171
yield return WaitForSpeechCommand();
171172

172173
SetStatus("Wireframe shape cylinder");
173-
boundsControl.LinksConfiguration.WireframeShape = Toolkit.Experimental.UI.BoundsControlTypes.WireframeType.Cylindrical;
174+
boundsControl.LinksConfiguration.WireframeShape = WireframeType.Cylindrical;
174175
yield return WaitForSpeechCommand();
175176

176177
Destroy(cube);
@@ -199,7 +200,7 @@ private IEnumerator Sequence()
199200
}
200201

201202
boundsControl = multiRoot.AddComponent<BoundsControl>();
202-
boundsControl.BoundsControlActivation = Toolkit.Experimental.UI.BoundsControlTypes.BoundsControlActivationType.ActivateOnStart;
203+
boundsControl.BoundsControlActivation = BoundsControlActivationType.ActivateOnStart;
203204
boundsControl.HideElementsInInspector = false;
204205
boundsControl.LinksConfiguration.WireframeEdgeRadius = .05f;
205206
multiRoot.AddComponent<ManipulationHandler>();

0 commit comments

Comments
 (0)