Hand tracking permission


When I check Initialize Hand Tracking On Startup, hand tracking permission is requested when the application is first started. Can we customize this permission? For example, not when the scene starts, but through a callback called from swift ui.

Hi there! Thanks for reaching out.

The use case you describe is exactly why we expose this a setting. If you uncheck that box, you won’t initialize hand tracking, and the app won’t as for permission until you try to turn it on for the first time.

You can see how to implement this in C# code in the ToggleHandSubsystem method of the ARControls script in the Metal sample. You can import the sample by going to the Apple visionOS XR Plugin package in the Package Manager UI, switching to the Samples tab, and importing either the URP or built-in sample (both contain the same scripts).

Let us know if you have any trouble getting this to work, or if you have any more questions. Good luck!

Thank you for your quick response.