Skip to content

Commit 2e2d1cc

Browse files
author
David Kline
committed
add ConstriaintManager in code when adding ObjectManipulator
1 parent b3d9f66 commit 2e2d1cc

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Assets/MRTK/Examples/Demos/UX/BoundingBox/Scripts/BoundingBoxExampleTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ private IEnumerator Sequence()
6464
bbox = cube.AddComponent<BoundingBox>();
6565
bbox.HideElementsInInspector = false;
6666
bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart;
67+
var cm = cube.AddComponent<ConstraintManager>();
6768
var om = cube.AddComponent<ObjectManipulator>();
6869
yield return WaitForSpeechCommand();
6970

@@ -197,6 +198,7 @@ private IEnumerator Sequence()
197198
bbox.BoundingBoxActivation = BoundingBox.BoundingBoxActivationType.ActivateOnStart;
198199
bbox.HideElementsInInspector = false;
199200
bbox.WireframeEdgeRadius = .05f;
201+
multiRoot.AddComponent<ConstraintManager>();
200202
multiRoot.AddComponent<ObjectManipulator>();
201203

202204
SetStatus("Randomize Child Scale for skewing");

Assets/MRTK/Examples/Demos/UX/BoundsControl/Scripts/BoundsControlRuntimeExample.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ private IEnumerator Sequence()
6868
boundsControl = cube.AddComponent<BoundsControl>();
6969
boundsControl.HideElementsInInspector = false;
7070
boundsControl.BoundsControlActivation = BoundsControlActivationType.ActivateOnStart;
71+
var cm = cube.AddComponent<ConstraintManager>();
7172
var om = cube.AddComponent<ObjectManipulator>();
7273
yield return WaitForSpeechCommand();
7374

@@ -200,6 +201,7 @@ private IEnumerator Sequence()
200201
boundsControl.BoundsControlActivation = BoundsControlActivationType.ActivateOnStart;
201202
boundsControl.HideElementsInInspector = false;
202203
boundsControl.LinksConfig.WireframeEdgeRadius = .05f;
204+
multiRoot.AddComponent<ConstraintManager>();
203205
multiRoot.AddComponent<ObjectManipulator>();
204206

205207
SetStatus("Randomize Child Scale for skewing");

Assets/MRTK/Examples/Demos/UX/ManipulationHandler/Scripts/ChangeManipulation.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public void TryStopManipulation()
3838
return;
3939
}
4040

41+
manipulatedObject.GetComponent<ConstraintManager>();
4142
var manipulationHandler = manipulatedObject.GetComponent<ManipulationHandler>();
4243
var objectManipulator = manipulatedObject.GetComponent<ObjectManipulator>();
4344
if (manipulationHandler != null || objectManipulator != null)

0 commit comments

Comments
 (0)