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