|
4 | 4 | using Microsoft.MixedReality.Toolkit.Input; |
5 | 5 | using Microsoft.MixedReality.Toolkit.UI; |
6 | 6 | using Microsoft.MixedReality.Toolkit.Experimental.UI.BoundsControl; |
| 7 | +using Microsoft.MixedReality.Toolkit.Experimental.UI.BoundsControlTypes; |
7 | 8 | using Microsoft.MixedReality.Toolkit.Utilities; |
8 | 9 | using System.Collections; |
9 | 10 | using System.Text; |
|
12 | 13 |
|
13 | 14 | namespace Microsoft.MixedReality.Toolkit.Examples.Experimental.Demos |
14 | 15 | { |
| 16 | + [AddComponentMenu("Scripts/MRTK/Experimental/Examples/BoundsControlRuntimeExample")] |
15 | 17 | /// <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 |
18 | 19 | /// </summary> |
19 | 20 | public class BoundsControlRuntimeExample : MonoBehaviour, IMixedRealitySpeechHandler |
20 | 21 | { |
@@ -67,7 +68,7 @@ private IEnumerator Sequence() |
67 | 68 | SetStatus("Instantiate BoundsControl"); |
68 | 69 | boundsControl = cube.AddComponent<BoundsControl>(); |
69 | 70 | boundsControl.HideElementsInInspector = false; |
70 | | - boundsControl.BoundsControlActivation = Toolkit.Experimental.UI.BoundsControlTypes.BoundsControlActivationType.ActivateOnStart; |
| 71 | + boundsControl.BoundsControlActivation = BoundsControlActivationType.ActivateOnStart; |
71 | 72 | var mh = cube.AddComponent<ManipulationHandler>(); |
72 | 73 | yield return WaitForSpeechCommand(); |
73 | 74 |
|
@@ -98,15 +99,15 @@ private IEnumerator Sequence() |
98 | 99 | yield return WaitForSpeechCommand(); |
99 | 100 |
|
100 | 101 | SetStatus("FlattenX"); |
101 | | - boundsControl.FlattenAxis = Toolkit.Experimental.UI.BoundsControlTypes.FlattenModeType.FlattenX; |
| 102 | + boundsControl.FlattenAxis = FlattenModeType.FlattenX; |
102 | 103 | yield return WaitForSpeechCommand(); |
103 | 104 |
|
104 | 105 | SetStatus("FlattenY"); |
105 | | - boundsControl.FlattenAxis = Toolkit.Experimental.UI.BoundsControlTypes.FlattenModeType.FlattenY; |
| 106 | + boundsControl.FlattenAxis = FlattenModeType.FlattenY; |
106 | 107 | yield return WaitForSpeechCommand(); |
107 | 108 |
|
108 | 109 | SetStatus("FlattenNone"); |
109 | | - boundsControl.FlattenAxis = Toolkit.Experimental.UI.BoundsControlTypes.FlattenModeType.DoNotFlatten; |
| 110 | + boundsControl.FlattenAxis = FlattenModeType.DoNotFlatten; |
110 | 111 | yield return WaitForSpeechCommand(); |
111 | 112 |
|
112 | 113 | SetStatus("ShowWireframe false"); |
@@ -170,7 +171,7 @@ private IEnumerator Sequence() |
170 | 171 | yield return WaitForSpeechCommand(); |
171 | 172 |
|
172 | 173 | SetStatus("Wireframe shape cylinder"); |
173 | | - boundsControl.LinksConfiguration.WireframeShape = Toolkit.Experimental.UI.BoundsControlTypes.WireframeType.Cylindrical; |
| 174 | + boundsControl.LinksConfiguration.WireframeShape = WireframeType.Cylindrical; |
174 | 175 | yield return WaitForSpeechCommand(); |
175 | 176 |
|
176 | 177 | Destroy(cube); |
@@ -199,7 +200,7 @@ private IEnumerator Sequence() |
199 | 200 | } |
200 | 201 |
|
201 | 202 | boundsControl = multiRoot.AddComponent<BoundsControl>(); |
202 | | - boundsControl.BoundsControlActivation = Toolkit.Experimental.UI.BoundsControlTypes.BoundsControlActivationType.ActivateOnStart; |
| 203 | + boundsControl.BoundsControlActivation = BoundsControlActivationType.ActivateOnStart; |
203 | 204 | boundsControl.HideElementsInInspector = false; |
204 | 205 | boundsControl.LinksConfiguration.WireframeEdgeRadius = .05f; |
205 | 206 | multiRoot.AddComponent<ManipulationHandler>(); |
|
0 commit comments