Skip to content

Commit 3cab8b2

Browse files
added missing license header, separated get / set in bounds control, added missing braces and fixed some whitespace issues
1 parent ab68be9 commit 3cab8b2

File tree

3 files changed

+66
-16
lines changed

3 files changed

+66
-16
lines changed

Assets/MixedRealityToolkit.SDK/Experimental/Features/UX/BoundsControl/BoundsControl.cs

Lines changed: 62 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ public BoundsControlActivationType BoundsControlActivation
131131
/// <summary>
132132
/// Check to draw a tether point from the handles to the hand when manipulating.
133133
/// </summary>
134-
public bool DrawTetherWhenManipulating { get => drawTetherWhenManipulating; set => drawTetherWhenManipulating = value;}
134+
public bool DrawTetherWhenManipulating
135+
{
136+
get => drawTetherWhenManipulating;
137+
set => drawTetherWhenManipulating = value;
138+
}
135139

136140
[SerializeField]
137141
[Tooltip("Add a Collider here if you do not want the handle colliders to interact with another object's collider.")]
@@ -140,7 +144,11 @@ public BoundsControlActivationType BoundsControlActivation
140144
/// <summary>
141145
/// Add a Collider here if you do not want the handle colliders to interact with another object's collider.
142146
/// </summary>
143-
public Collider HandlesIgnoreCollider { get => handlesIgnoreCollider; set => handlesIgnoreCollider = value; }
147+
public Collider HandlesIgnoreCollider
148+
{
149+
get => handlesIgnoreCollider;
150+
set => handlesIgnoreCollider = value;
151+
}
144152

145153
[SerializeField]
146154
[Tooltip("Flatten bounds in the specified axis or flatten the smallest one if 'auto' is selected")]
@@ -207,47 +215,71 @@ public Vector3 BoxPadding
207215
/// <summary>
208216
/// Bounds control box display configuration section.
209217
/// </summary>
210-
public BoxDisplayConfiguration BoxDisplayConfiguration { get => boxDisplayConfiguration; set => boxDisplayConfiguration = value; }
218+
public BoxDisplayConfiguration BoxDisplayConfiguration
219+
{
220+
get => boxDisplayConfiguration;
221+
set => boxDisplayConfiguration = value;
222+
}
211223

212224
[SerializeField]
213225
[Tooltip("This section defines the links / lines that are drawn between the corners of the control.")]
214226
private LinksConfiguration linksConfiguration;
215227
/// <summary>
216228
/// This section defines the links / lines that are drawn between the corners of the control.
217229
/// </summary>
218-
public LinksConfiguration LinksConfiguration { get => linksConfiguration; set => linksConfiguration = value; }
230+
public LinksConfiguration LinksConfiguration
231+
{
232+
get => linksConfiguration;
233+
set => linksConfiguration = value;
234+
}
219235

220236
[SerializeField]
221237
[Tooltip("Configuration of the scale handles.")]
222238
private ScaleHandlesConfiguration scaleHandlesConfiguration;
223239
/// <summary>
224240
/// Configuration of the scale handles.
225241
/// </summary>
226-
public ScaleHandlesConfiguration ScaleHandlesConfiguration { get => scaleHandlesConfiguration; set => scaleHandlesConfiguration = value; }
242+
public ScaleHandlesConfiguration ScaleHandlesConfiguration
243+
{
244+
get => scaleHandlesConfiguration;
245+
set => scaleHandlesConfiguration = value;
246+
}
227247

228248
[SerializeField]
229249
[Tooltip("Configuration of the rotation handles.")]
230250
private RotationHandlesConfiguration rotationHandlesConfiguration;
231251
/// <summary>
232252
/// Configuration of the rotation handles.
233253
/// </summary>
234-
public RotationHandlesConfiguration RotationHandles { get => rotationHandlesConfiguration; set => rotationHandlesConfiguration = value; }
254+
public RotationHandlesConfiguration RotationHandles
255+
{
256+
get => rotationHandlesConfiguration;
257+
set => rotationHandlesConfiguration = value;
258+
}
235259

236260
[SerializeField]
237261
[Tooltip("Configuration for Proximity Effect to scale handles or change materials on proximity.")]
238262
private ProximityEffectConfiguration handleProximityEffectConfiguration;
239263
/// <summary>
240264
/// Configuration for Proximity Effect to scale handles or change materials on proximity.
241265
/// </summary>
242-
public ProximityEffectConfiguration HandleProximityEffectConfiguration { get => handleProximityEffectConfiguration; set => handleProximityEffectConfiguration = value; }
266+
public ProximityEffectConfiguration HandleProximityEffectConfiguration
267+
{
268+
get => handleProximityEffectConfiguration;
269+
set => handleProximityEffectConfiguration = value;
270+
}
243271

244272
[Header("Debug")]
245273
[Tooltip("Debug only. Component used to display debug messages.")]
246274
private TextMesh debugText;
247275
/// <summary>
248276
/// Component used to display debug messages.
249277
/// </summary>
250-
public TextMesh DebugText { get => debugText; set => debugText = value; }
278+
public TextMesh DebugText
279+
{
280+
get => debugText;
281+
set => debugText = value;
282+
}
251283

252284
[SerializeField]
253285
[Tooltip("Determines whether to hide GameObjects (i.e handles, links etc) created and managed by this component in the editor")]
@@ -276,31 +308,47 @@ public bool HideElementsInInspector
276308
/// <summary>
277309
/// Event that gets fired when interaction with a rotation handle starts.
278310
/// </summary>
279-
public UnityEvent RotateStarted { get => rotateStarted; set => rotateStarted = value; }
311+
public UnityEvent RotateStarted
312+
{
313+
get => rotateStarted;
314+
set => rotateStarted = value;
315+
}
280316

281317
[SerializeField]
282318
[Tooltip("Event that gets fired when interaction with a rotation handle stops.")]
283319
private UnityEvent rotateStopped = new UnityEvent();
284320
/// <summary>
285321
/// Event that gets fired when interaction with a rotation handle stops.
286322
/// </summary>
287-
public UnityEvent RotateStopped { get => rotateStopped; set => rotateStopped = value; }
323+
public UnityEvent RotateStopped
324+
{
325+
get => rotateStopped;
326+
set => rotateStopped = value;
327+
}
288328

289329
[SerializeField]
290330
[Tooltip("Event that gets fired when interaction with a scale handle starts.")]
291331
private UnityEvent scaleStarted = new UnityEvent();
292332
/// <summary>
293333
/// Event that gets fired when interaction with a scale handle starts.
294334
/// </summary>
295-
public UnityEvent ScaleStarted { get => scaleStarted; set => scaleStarted = value; }
335+
public UnityEvent ScaleStarted
336+
{
337+
get => scaleStarted;
338+
set => scaleStarted = value;
339+
}
296340

297341
[SerializeField]
298342
[Tooltip("Event that gets fired when interaction with a scale handle stops.")]
299343
private UnityEvent scaleStopped = new UnityEvent();
300344
/// <summary>
301345
/// Event that gets fired when interaction with a scale handle stops.
302346
/// </summary>
303-
public UnityEvent ScaleStopped { get => scaleStopped; set => scaleStopped = value; }
347+
public UnityEvent ScaleStopped
348+
{
349+
get => scaleStopped;
350+
set => scaleStopped = value;
351+
}
304352

305353
#endregion Serialized Fields
306354

@@ -866,7 +914,9 @@ private void DestroyRig()
866914
private void UpdateRigVisibilityInInspector()
867915
{
868916
if (!IsInitialized())
917+
{
869918
return;
919+
}
870920

871921
HideFlags desiredFlags = hideElementsInInspector ? HideFlags.HideInHierarchy | HideFlags.HideInInspector : HideFlags.None;
872922
scaleHandles.UpdateVisibilityInInspector(desiredFlags);

Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/IBoundsTargetProvider.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-

1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
24
using UnityEngine;
35

46
namespace Microsoft.MixedReality.Toolkit.UI
@@ -9,7 +11,6 @@ namespace Microsoft.MixedReality.Toolkit.UI
911
/// </summary>
1012
internal interface IBoundsTargetProvider
1113
{
12-
1314
/// <summary>
1415
/// Indicates if the provider is currently active
1516
/// </summary>

Assets/MixedRealityToolkit.Tests/EditModeTests/Experimental/BoundsControlTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ namespace Microsoft.MixedReality.Toolkit.Tests.Experimental
1111
/// Tests for edit mode behavior of bounds control
1212
/// </summary>
1313
public class BoundsControlTests
14-
{
15-
14+
{
1615
[Test]
1716
/// <summary>
1817
/// Tests configuring every property of bounds control in edit mode

0 commit comments

Comments
 (0)