At the time of writing, Unity 2021 had made some of the code in the WebXR Exporter package obsolete, causing errors after adding the package – this may have been fixed with a more recent release of WebXR Exporter. The blog post at https://forum.unity.com/threads/xrdevice-ispresent-is-obsolete.1057556/ discusses this issue, and a solution can be found at https://docs.unity3d.com/ScriptReference/XR.XRDevice-isPresent.html. Basically, the XRDevice.isPresent expression is no longer valid in Unity. This can be resolved by following these two steps:
- Create a C# script file called XRDeviceUtility.cs in the Project window folder called WebXR | Scripts and ensure it contains the following code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.XR;
namespace WebXR {
internal static class XRDeviceUtility {
public static bool isPresent...