AR Button kickoff function

When you push the goggles button on mobiles to enter AR, what function(s) fire to kick the whole show off?

I want to move that functionality elsewhere and get rid of the default button as a simple icon swap that the XR class lets you do is not going to do it. I did not see the startup function assigned to its onclick.

cc @RaananW

The function executed is the enterXRAsync of the experience helper:

Babylon.js/webXREnterExitUI.ts at master · BabylonJS/Babylon.js · GitHub

You can technically run the entire process yourself, but using the helper is simpler.

1 Like

Thanks, don’t know how I missed that in the code when searching.

1 Like