-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NRE on OpenXRLeapProvider when Initialize XR on Startup is disabled #1360
Comments
Hi @bdovaz, Thanks for raising this, you are right and this is an oversight on my part! I will raise a ticket for it and hope to address it in a release ASAP |
As an extra, we have internally discussed the idea of adding the ability to re-initialize the XRLeapProviderManager at runtime (or even edit the specified tracking source), it sounds like this would be relevant to your use case To help us guide that conversation and any resulting implementation, Can I ask what your application is doing for it to swap between XR and non-XR and whether this would be a useful feature? |
Per NDA I can't comment much but it is a development that can be run with or without XR. That is:
In runtime a parameter is read by command line which is what is used to decide one thing or the other. The use of Ultraleap is not required so when we are in keyboard and mouse mode we "simulate hands" and you can touch and pick up objects in a more simplified way. |
Thanks, that's helpful information :) Also, as a stop-gap until a release includes the fix, you should be able to have the XRLeapProviderManager disabled by default, and enable it if you do enter XR mode? That would kick the While loop off when you know it will not fail :) |
This has been addressed in 6.5.0 |
In our project we decide in execution if we activate or not XR depending on some parameters.
This makes that from the beginning this option is not checked and that is why we have realized that there is a use case that is not handled as far as I can see.
In this while loop it seems that it checks that neither "XRGeneralSettings.Instance" nor "XRGeneralSettings.Instance.Manager" nor "XRGeneralSettings.Instance.Manager.activeLoader" is null:
https://github.com/ultraleap/UnityPlugin/blob/com.ultraleap.tracking/6.3.0/Packages/Tracking/Core/Runtime/Scripts/XRLeapProviderManager.cs#L98
But shouldn't the operator be || (OR)? As it is it would just check that "XRGeneralSettings.Instance" is not null and exit while loop.
By having that check incorrectly, it causes this script to fail with an NRE on the next line:
https://github.com/ultraleap/UnityPlugin/blob/com.ultraleap.tracking/6.3.0/Packages/Tracking/OpenXR/Runtime/Scripts/OpenXRLeapProvider.cs#L63
The text was updated successfully, but these errors were encountered: