Enter AR button functionality linking to React button

How to enable “xr-button-overlay” functionality to the react button

Hi Krishna_Kishore,

To be clear, is the question about how to start XR after pressing a button other than the default UI Babylon.js comes with? If so, I think you can do this by calling enterXRAsync on your WebXRExperienceHelper in the callback for your button. This can get a little fiddly sometimes depending on what you’re reacting to and how you called back to it, but as long the thing that set off your callback was a user interaction such as a button press I think you should be fine. Hope this helps, and best of luck!

1 Like