Multi-user capabilities got a "NotImplementedException"
Description
From the ASA multi-user capabilities tutorial. Both OnInputUp(), OnOwnershipTransfered() and OnTriggerExit() throw a new NotImplementedException() as ... well, as written in the code. It then fire a console error inside the HL2 because of the NotImplementedException() when releasing a select input (for example when grabing and the releasing the rover's body).
To reproduce
Just follow the ASA multi-user capabilities tutorial from start to bottom.
Error
NotImplementedException: The method or operation is not implemented.
MRTK.Tutorials.MultiUserCapabilities.OwnershipHandler.OnInputUp (Microsoft.MixedReality.Toolkit.Input.InputEventData eventData) (at Assets/MRTK.Tutorials.MultiUserCapabilities/Scripts/OwnershipHandler.cs:19)
Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem+<>c.<.cctor>b__240_18 (Microsoft.MixedReality.Toolkit.Input.IMixedRealityBaseInputHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Assets/MRTK/Services/InputSystem/MixedRealityInputSystem.cs:1318)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at D:/all_softwares/unity-editors/2019.3.15f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.ExecuteEvents:ExecuteHierarchy(GameObject, BaseEventData, EventFunction`1)
Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem:DispatchEventToObjectFocusedByPointer(IMixedRealityPointer, BaseInputEventData, Boolean, EventFunction`1) (at Assets/MRTK/Services/InputSystem/MixedRealityInputSystem.cs:653)
Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem:HandleEvent(BaseEventData, EventFunction`1) (at Assets/MRTK/Services/InputSystem/MixedRealityInputSystem.cs:421)
Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem:RaiseOnInputUp(IMixedRealityInputSource, Handedness, MixedRealityInputAction) (at Assets/MRTK/Services/InputSystem/MixedRealityInputSystem.cs:1347)
Microsoft.MixedReality.Toolkit.Input.SimulatedArticulatedHand:UpdateInteractions(SimulatedHandData) (at Assets/MRTK/Services/InputSimulation/SimulatedArticulatedHand.cs:114)
Microsoft.MixedReality.Toolkit.Input.SimulatedHand:UpdateState(SimulatedHandData) (at Assets/MRTK/Services/InputSimulation/SimulatedHand.cs:107)
Microsoft.MixedReality.Toolkit.Input.BaseInputSimulationService:UpdateHandDevice(HandSimulationMode, Handedness, SimulatedHandData) (at Assets/MRTK/Services/InputSimulation/BaseInputSimulationService.cs:75)
Microsoft.MixedReality.Toolkit.Input.InputSimulationService:LateUpdate() (at Assets/MRTK/Services/InputSimulation/InputSimulationService.cs:340)
Microsoft.MixedReality.Toolkit.BaseDataProviderAccessCoreSystem:LateUpdate() (at Assets/MRTK/Core/Services/BaseDataProviderAccessCoreSystem.cs:71)
Microsoft.MixedReality.Toolkit.<>c:<LateUpdateAllServices>b__66_0(IMixedRealityService) (at Assets/MRTK/Core/Services/MixedRealityToolkit.cs:963)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServicesInOrder(Action`1) (at Assets/MRTK/Core/Services/MixedRealityToolkit.cs:1034)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:LateUpdateAllServices() (at Assets/MRTK/Core/Services/MixedRealityToolkit.cs:963)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:LateUpdate() (at Assets/MRTK/Core/Services/MixedRealityToolkit.cs:638)
Versions
- Unity 2019.3.15f1
- MRTK 2.4.0
- All recommended dependencies versions (ARFoundation, ARCore, Input Helpers).
Target platform
- HoloLens 2
- Android
Additional context
I might be missing an obvious point here : I lack a proper "background" regarding programming so many things/concepts are still "blurry" so pardon me if there is an obvious awnser to this error. The way I see it, it is intended but, why ?
This question might actually be better directed at the docs themselves (i.e. https://docs.microsoft.com/en-us/windows/mixed-reality/mr-learning-sharing-01 filing an issue at the bottom there), since the code here having an issue isn't actually part of the MRTK itself.
That being said, if you could attach a .zip of the code we might be able to take a peek. It sounds like it's literally just not implemented (and you'd have to actually add some code in to implement it). If this is actually missing from the tutorials then we'd want to update those there (hence filing the issue on the docs themselves)
Hi!
Pardon me for the late follow-up.
The script is realatively short, and as a work-around, I have simply commented the throw new NotImplementedException()
I have fulfilled an issue on the documentation page and here is the script as requested (but I think you are right, it is to the user to complete it (even tho you can trigger something on user input up via the MRTK (the end of a touch interaction for example). OwnershipHandler.zip
Looks like this was fixed on the MRLearning repo via https://github.com/microsoft/MixedRealityLearning/pull/26