diff --git a/com.microsoft.mrtk.input/Interactors/InteractorVisuals/MRTKRayReticleVisual.cs b/com.microsoft.mrtk.input/Interactors/InteractorVisuals/MRTKRayReticleVisual.cs index 7389adda875..a9eab2a6f70 100644 --- a/com.microsoft.mrtk.input/Interactors/InteractorVisuals/MRTKRayReticleVisual.cs +++ b/com.microsoft.mrtk.input/Interactors/InteractorVisuals/MRTKRayReticleVisual.cs @@ -72,6 +72,19 @@ private void OnDisable() ReticleSetActive(false); } + /// + /// A Unity event function that is called every frame, if this object is enabled. + /// + private void LateUpdate() + { + // if running in batch mode the onBeforeRender event doesn't fire so + // we need to update the reticle here + if (Application.isBatchMode) + { + UpdateReticle(); + } + } + private static readonly ProfilerMarker UpdateReticlePerfMarker = new ProfilerMarker("[MRTK] MRTKRayReticleVisual.UpdateReticle"); [BeforeRenderOrder(XRInteractionUpdateOrder.k_BeforeRenderLineVisual)] diff --git a/com.microsoft.mrtk.spatialmanipulation/Tests/Runtime/BoundsControlTests.cs b/com.microsoft.mrtk.spatialmanipulation/Tests/Runtime/BoundsControlTests.cs index add162ea77b..8183754f85b 100644 --- a/com.microsoft.mrtk.spatialmanipulation/Tests/Runtime/BoundsControlTests.cs +++ b/com.microsoft.mrtk.spatialmanipulation/Tests/Runtime/BoundsControlTests.cs @@ -310,16 +310,15 @@ public IEnumerator TestNoHandlesToggleWhenMovingWithObjectManipulator([ValueSour [UnityTest] public IEnumerator TestManipulationCursor([ValueSource(nameof(BoundsVisualsPrefabs))] string visualsPath) { - // TODO: re-enable tests after debugging failures during build // Known left scale handle - // yield return HoverCursorRotation("ScaleHandle", new Vector3(0f, 180f, 45f), visualsPath); + yield return HoverCursorRotation("ScaleHandle", new Vector3(0f, 180f, 45f), visualsPath); // Known right scale handle - // yield return HoverCursorRotation("ScaleHandle (1)", new Vector3(0f, 180f, 315f), visualsPath); + yield return HoverCursorRotation("ScaleHandle (1)", new Vector3(0f, 180f, 315f), visualsPath); // Known bottom rotate handle - // yield return HoverCursorRotation("RotateHandle (5)", new Vector3(0f, 180f, 90f), visualsPath); + yield return HoverCursorRotation("RotateHandle (5)", new Vector3(0f, 180f, 90f), visualsPath); // Known side rotate handle - // yield return HoverCursorRotation("RotateHandle (10)", new Vector3(0f, 180f, 0f), visualsPath); - yield return null; + yield return HoverCursorRotation("RotateHandle (10)", new Vector3(0f, 180f, 0f), visualsPath); + } private bool ApproximatelyEquals(Vector3 a, Vector3 b, float tolerance = 0.1f)