Test for AR support without initializing an XR Engine instance

Is there a way to test for WebXR support (in general, or bonus if its specific features) without trying to initializing an AR engine instance then catching if it fails?

Does ā€œengine instanceā€ mean you havenā€™t created an engine?

In general, the way I check is asynchronous, like this

async function(){
const supported = await WebXRSessionManager.IsSessionSupportedAsync(ā€˜immersive-arā€™);
if (supported) {
createAR();
} else {
error();
}
}

2 Likes