using UnityEngine; using Valve.VR; using System; public class WatchOverlay : MonoBehaviour { private void Start() { if (OpenVR.System != null) return; Debug.Log(OpenVR.Overlay); var error = EVRInitError.None; OpenVR.Init(ref error, EVRApplicationType.VRApplication_Overlay); if (error != EVRInitError.None) { throw new Exception("Failed to initialize OpenVR: " + error); } Debug.Log(OpenVR.Overlay); } private void OnDestroy() { if (OpenVR.System != null) { OpenVR.Shutdown(); } } }