Skip to content

Commit ce3a825

Browse files
committed
Change RemoveController to take in an InteractionSource instead of InteractionSourceState
1 parent ab5c4b6 commit ce3a825

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityDeviceManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public override void Disable()
373373
InteractionSourceState[] states = InteractionManager.GetCurrentReading();
374374
for (var i = 0; i < states.Length; i++)
375375
{
376-
RemoveController(states[i]);
376+
RemoveController(states[i].source);
377377
}
378378
}
379379

@@ -438,16 +438,16 @@ private WindowsMixedRealityController GetController(InteractionSource interactio
438438
/// Remove the selected controller from the Active Store
439439
/// </summary>
440440
/// <param name="interactionSourceState">Source State provided by the SDK to remove</param>
441-
private void RemoveController(InteractionSourceState interactionSourceState)
441+
private void RemoveController(InteractionSource interactionSource)
442442
{
443-
var controller = GetController(interactionSourceState.source, false);
443+
var controller = GetController(interactionSource, false);
444444

445445
if (controller != null)
446446
{
447447
MixedRealityToolkit.InputSystem?.RaiseSourceLost(controller.InputSource, controller);
448448
}
449449

450-
activeControllers.Remove(interactionSourceState.source.id);
450+
activeControllers.Remove(interactionSource.id);
451451
}
452452

453453
#endregion Controller Utilities
@@ -478,7 +478,7 @@ private void InteractionManager_InteractionSourceDetected(InteractionSourceDetec
478478
/// <param name="args">SDK source updated event arguments</param>
479479
private void InteractionManager_InteractionSourceLost(InteractionSourceLostEventArgs args)
480480
{
481-
RemoveController(args.state);
481+
RemoveController(args.state.source);
482482
}
483483

484484
#endregion Unity InteractionManager Events

0 commit comments

Comments
 (0)