Skip to content

Commit 6d71ed9

Browse files
committed
Minor alignment of attributes
1 parent 723561c commit 6d71ed9

File tree

2 files changed

+18
-32
lines changed

2 files changed

+18
-32
lines changed

org.mixedrealitytoolkit.spatialmanipulation/BoundsControl/BoundsControl.cs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ public bool OverrideBounds
105105
}
106106
}
107107

108-
[SerializeField]
109-
[DrawIf("overrideBounds")]
108+
[SerializeField, DrawIf("overrideBounds")]
110109
[Tooltip("The bounds will be calculated from this object and this object only, instead of the entire hierarchy.")]
111110
private Transform boundsOverride;
112111

@@ -196,8 +195,7 @@ public bool ToggleHandlesOnClick
196195
set => toggleHandlesOnClick = value;
197196
}
198197

199-
[SerializeField]
200-
[DrawIf("toggleHandlesOnClick")]
198+
[SerializeField, DrawIf("toggleHandlesOnClick")]
201199
[Tooltip("During a selection of the associated interactable, if the interactable is dragged/moved a smaller distance than this value, the handles will be activated/deactivated.")]
202200
private float dragToggleThreshold = 0.02f;
203201

@@ -331,8 +329,7 @@ public bool SmoothingActive
331329
set => smoothingActive = value;
332330
}
333331

334-
[SerializeField]
335-
[DrawIf("smoothingActive")]
332+
[SerializeField, DrawIf("smoothingActive")]
336333
[Tooltip("Enter amount representing amount of smoothing to apply to the rotation. Smoothing of 0 means no smoothing. Max value means no change to value.")]
337334
private float rotateLerpTime = 0.00001f;
338335

@@ -345,8 +342,7 @@ public float RotateLerpTime
345342
set => rotateLerpTime = value;
346343
}
347344

348-
[SerializeField]
349-
[DrawIf("smoothingActive")]
345+
[SerializeField, DrawIf("smoothingActive")]
350346
[Tooltip("Enter amount representing amount of smoothing to apply to the scale. Smoothing of 0 means no smoothing. Max value means no change to value.")]
351347
private float scaleLerpTime = 0.00001f;
352348

@@ -359,8 +355,7 @@ public float ScaleLerpTime
359355
set => scaleLerpTime = value;
360356
}
361357

362-
[SerializeField]
363-
[DrawIf("smoothingActive")]
358+
[SerializeField, DrawIf("smoothingActive")]
364359
[Tooltip("Enter amount representing amount of smoothing to apply to the translation. " +
365360
"Smoothing of 0 means no smoothing. Max value means no change to value.")]
366361
private float translateLerpTime = 0.00001f;
@@ -390,8 +385,7 @@ public bool EnableConstraints
390385
set => enableConstraints = value;
391386
}
392387

393-
[SerializeField]
394-
[DrawIf("enableConstraints")]
388+
[SerializeField, DrawIf("enableConstraints")]
395389
[Tooltip("Constraint manager slot to enable constraints when manipulating the object.")]
396390
private ConstraintManager constraintsManager;
397391
/// <summary>
@@ -434,7 +428,7 @@ public LogicType ManipulationLogicTypes
434428
[Header("Events")]
435429

436430
[SerializeField]
437-
SelectEnterEvent manipulationStarted = new SelectEnterEvent();
431+
private SelectEnterEvent manipulationStarted = new SelectEnterEvent();
438432

439433
/// <summary>
440434
/// Fired when manipulation on a handle begins.
@@ -446,7 +440,7 @@ public SelectEnterEvent ManipulationStarted
446440
}
447441

448442
[SerializeField]
449-
SelectExitEvent manipulationEnded = new SelectExitEvent();
443+
private SelectExitEvent manipulationEnded = new SelectExitEvent();
450444

451445
/// <summary>
452446
/// Fired when manipulation on a handle ends.

org.mixedrealitytoolkit.spatialmanipulation/ObjectManipulator/ObjectManipulator.cs

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public enum RotateAnchorType
7070
/// This enumeration describing the type of behavior to apply when a
7171
/// <see cref="ObjectManipulator"/> is released by a controller.
7272
/// </summary>
73-
[System.Flags]
73+
[Flags]
7474
public enum ReleaseBehaviorType
7575
{
7676
/// <summary>
@@ -206,8 +206,7 @@ public bool ApplyTorque
206206
set => applyTorque = value;
207207
}
208208

209-
[SerializeField]
210-
[Range(0.001f, 2.0f)]
209+
[SerializeField, Range(0.001f, 2.0f)]
211210
[Tooltip("The time scale at which a Rigidbody reacts to input movement defined as oscillation period of the dampened spring force.")]
212211
private float springForceSoftness = 0.1f;
213212

@@ -220,8 +219,7 @@ public float SpringForceSoftness
220219
set => springForceSoftness = value;
221220
}
222221

223-
[SerializeField]
224-
[Range(0.001f, 2.0f)]
222+
[SerializeField, Range(0.001f, 2.0f)]
225223
[Tooltip("The time scale at which a Rigidbody reacts to input rotation defined as oscillation period of the dampened spring torque.")]
226224
private float springTorqueSoftness = 0.1f;
227225

@@ -234,9 +232,8 @@ public float SpringTorqueSoftness
234232
set => springTorqueSoftness = value;
235233
}
236234

237-
[SerializeField]
238-
[Range(0, 2.0f)]
239-
[Tooltip("The damping of the spring force&torque. A value of one corresponds to critical damping, lower values lead to under damping or oscillation.")]
235+
[SerializeField, Range(0, 2.0f)]
236+
[Tooltip("The damping of the spring force & torque. A value of one corresponds to critical damping, lower values lead to under damping or oscillation.")]
240237
private float springDamping = 1.0f;
241238

242239
/// <summary>
@@ -248,8 +245,7 @@ public float SpringDamping
248245
set => springDamping = value;
249246
}
250247

251-
[SerializeField]
252-
[Range(0, 10000f)]
248+
[SerializeField, Range(0, 10000f)]
253249
[Tooltip("The maximum acceleration applied by the spring force to avoid trembling when pushing a body against a static object.")]
254250
private float springForceLimit = 100.0f;
255251

@@ -324,8 +320,7 @@ public SystemType TransformSmoothingLogicType
324320
}
325321
}
326322

327-
[FormerlySerializedAs("smoothingActive")]
328-
[SerializeField]
323+
[SerializeField, FormerlySerializedAs("smoothingActive")]
329324
[Tooltip("Frame-rate independent smoothing for far interactions. Far smoothing is enabled by default.")]
330325
private bool smoothingFar = true;
331326

@@ -357,8 +352,7 @@ public bool SmoothingNear
357352
set => smoothingNear = value;
358353
}
359354

360-
[SerializeField]
361-
[Range(0, 1)]
355+
[SerializeField, Range(0, 1)]
362356
[Tooltip("Enter amount representing amount of smoothing to apply to the movement. Smoothing of 0 means no smoothing. Max value means no change to value.")]
363357
private float moveLerpTime = 0.001f;
364358

@@ -371,8 +365,7 @@ public float MoveLerpTime
371365
set => moveLerpTime = value;
372366
}
373367

374-
[SerializeField]
375-
[Range(0, 1)]
368+
[SerializeField, Range(0, 1)]
376369
[Tooltip("Enter amount representing amount of smoothing to apply to the rotation. Smoothing of 0 means no smoothing. Max value means no change to value.")]
377370
private float rotateLerpTime = 0.001f;
378371

@@ -385,8 +378,7 @@ public float RotateLerpTime
385378
set => rotateLerpTime = value;
386379
}
387380

388-
[SerializeField]
389-
[Range(0, 1)]
381+
[SerializeField, Range(0, 1)]
390382
[Tooltip("Enter amount representing amount of smoothing to apply to the scale. Smoothing of 0 means no smoothing. Max value means no change to value.")]
391383
private float scaleLerpTime = 0.001f;
392384

0 commit comments

Comments
 (0)