Skip to content

Commit 0993c94

Browse files
authored
Merge pull request #3718 from keveleigh/cleanup-pass
Assorted formatting and comment updates
2 parents 35c0b2c + 077978a commit 0993c94

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ float IMixedRealityFocusProvider.GlobalPointingExtent
4242
get
4343
{
4444
MixedRealityInputSystemProfile profile = ConfigurationProfile as MixedRealityInputSystemProfile;
45-
45+
4646
if ((Service != null) &&
4747
(profile != null) &&
4848
profile.PointerProfile != null)
@@ -554,6 +554,7 @@ public bool UnregisterPointer(IMixedRealityPointer pointer)
554554

555555
if (!objectIsStillFocusedByOtherPointer)
556556
{
557+
// Policy: only raise focus exit if no other pointers are still focusing the object
557558
MixedRealityToolkit.InputSystem.RaiseFocusExit(pointer, unfocusedObject);
558559
}
559560

@@ -699,7 +700,7 @@ private static void RaycastPhysics(PointerData pointerData, LayerMask[] prioriti
699700
case RaycastMode.Simple:
700701
if (MixedRealityRaycaster.RaycastSimplePhysicsStep(pointerRays[i], prioritizedLayerMasks, out physicsHit))
701702
{
702-
UpdatePointerRayOnHit(pointerData, pointerRays, in physicsHit, i);
703+
UpdatePointerRayOnHit(pointerData, pointerRays, in physicsHit, i);
703704
return;
704705
}
705706
break;
@@ -772,8 +773,10 @@ private void RaycastGraphics(PointerData pointerData, LayerMask[] prioritizedLay
772773
}
773774

774775
// Check if we need to overwrite the physics raycast info
775-
if ((pointerData.CurrentPointerTarget == null || overridePhysicsRaycast) && raycastResult.isValid &&
776-
raycastResult.module != null && raycastResult.module.eventCamera == UIRaycastCamera)
776+
if ((pointerData.CurrentPointerTarget == null || overridePhysicsRaycast) &&
777+
raycastResult.isValid &&
778+
raycastResult.module != null &&
779+
raycastResult.module.eventCamera == UIRaycastCamera)
777780
{
778781
newUiRaycastPosition.x = raycastResult.screenPosition.x;
779782
newUiRaycastPosition.y = raycastResult.screenPosition.y;
@@ -935,7 +938,7 @@ private void UpdateFocusedObjects()
935938
pendingPointerSpecificFocusChange.Clear();
936939
}
937940

938-
#endregion Accessors
941+
#endregion Utilities
939942

940943
#region ISourceState Implementation
941944

Assets/MixedRealityToolkit/Attributes/MixedRealityExtensionServiceAttribute.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,17 @@ public MixedRealityExtensionServiceAttribute(
7474
PackageFolder = packageFolder;
7575
}
7676

77+
#if UNITY_EDITOR
7778
/// <summary>
7879
/// Convenience function for retrieving the attribute given a certain class type.
7980
/// </summary>
81+
/// <remarks>
82+
/// This function is only available in a UnityEditor context.
83+
/// </remarks>
8084
public static MixedRealityExtensionServiceAttribute Find(Type type)
8185
{
8286
return type.GetCustomAttributes(typeof(MixedRealityExtensionServiceAttribute), true).FirstOrDefault() as MixedRealityExtensionServiceAttribute;
8387
}
88+
#endif // UNITY_EDITOR
8489
}
8590
}

Assets/MixedRealityToolkit/Definitions/Devices/MixedRealityControllerMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public string Description
4444
}
4545
}
4646

47-
string handednessText = string.Empty;
47+
string handednessText = string.Empty;
4848
switch (handedness)
4949
{
5050
case Handedness.Left:

Assets/MixedRealityToolkit/Definitions/Lines/LinePointTransformMode.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)