When running a VR application built using the following:
Two TeleportPointer messages are present in the headset's diagnostics panel. Teleportation works, though there is no cursor apparent in the world.
I have been able to reproduce releated(?) errors using Unity 2018.4 and the HandInteractionExamples demo.
I can NOT repro when using MRTK 2.3.0.
Whoops. Accidentally pressed "close and comment" which I thought said "cancel" for a minute :-)
This was first filed using the boundary visualization demo.
With the hand interaction examples demo, i am also seeing messages stating that the 'given key is not present in the dictionary' as well as 'xxx controller has not been registered with the input system'.
The app is functional. Both controllers appear and are operational.
I will have to double check the registration error to confirm whether or not it says "not been" or "already".
I believe i miss-read the message as this appears to be the relevant message from the input system (RaiseSourceDetected):
c#
if (DetectedInputSources.Contains(source)) { Debug.LogError($"{source.SourceName} has already been registered with the Input Manager!"); }
Searching the MRTK code, i am not finding a message re: "given key is not present".
I think "given key is not present" is just the standard dictionary message
So far, I have been unable to reproduce this with MRTK 2.3.0 and Unity 2018.4.22f1
@vaoliva has confirmed this also occurs on a WMR ultra pc.
Looks like this was introduced in #6939, which added some awaits while the controller model loads. Previously, we fired a source detected the same frame the pointers were created, and the controller continued to load the controller models in the background. Now, pointers are created, then the source detected event waits for the controller models to be loaded.
Currently, the teleport cursor checks every Update for its pointer to be registered (which happens on source detected). If its pointer isn't registered, it destroys itself, leading to the behavior described above.
Possible solutions:
@keveleigh, thanks for helping root cause this!
Option 2 seems reasonable
In working on option 2, there are enough new issues being uncovered. I am going to revert to the 2.3 Windows Mixed Reality Controller behavior and open a new issue to re-implement #6939 and resolve the side effects properly in the input and teleport systems.