Skip to content

Commit fabdd6b

Browse files
committed
make generalize fix to Holographic Simulation
1 parent c3c7a8d commit fabdd6b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityController.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,15 @@ private void UpdateTriggerData(InteractionSourceState interactionSourceState, Mi
418418

419419
// BEGIN WORKAROUND: Unity issue #1033526
420420
// See https://issuetracker.unity3d.com/issues/hololens-interactionsourcestate-dot-selectpressed-is-false-when-air-tap-and-hold
421-
// Bug was discovered May 2018 and still exists as of today Feb 2019 in version 2018.3.4f1, timeline for fix unknown
422-
// The bug only and the workaround affect only the development workflow via Holographic Remoting
423-
if (UnityEngine.XR.WSA.HolographicRemoting.ConnectionState == UnityEngine.XR.WSA.HolographicStreamerConnectionState.Connected
424-
&& interactionSourceState.source.kind == InteractionSourceKind.Hand)
421+
// Bug was discovered May 2018 and still exists as of today Feb 2019 in version 2018.3.4f1, timeline for fix is unknown
422+
// The bug only affects the development workflow via Holographic Remoting or Simulation
423+
if (interactionSourceState.source.kind == InteractionSourceKind.Hand)
425424
{
426-
Debug.Assert(!interactionSourceState.selectPressed, "Unity issue #1033526 seems to have been resolved. Please remove this ugly workaround!");
425+
Debug.Assert(!(UnityEngine.XR.WSA.HolographicRemoting.ConnectionState == UnityEngine.XR.WSA.HolographicStreamerConnectionState.Connected
426+
&& interactionSourceState.selectPressed),
427+
"Unity issue #1033526 seems to have been resolved. Please remove this ugly workaround!");
427428

429+
// This workaround is safe as long as all these assumptions hold:
428430
Debug.Assert(!interactionSourceState.source.supportsGrasp);
429431
Debug.Assert(!interactionSourceState.source.supportsMenu);
430432
Debug.Assert(!interactionSourceState.source.supportsPointing);

0 commit comments

Comments
 (0)