Exemplo n.º 1
0
    private void OnEnable()
    {
        CVROverlay overlay = OpenVR.Overlay;

        if (overlay != null)
        {
            EVROverlayError evroverlayError = overlay.CreateOverlay(SteamVR_Overlay.key, base.gameObject.name, ref this.handle);
            if (evroverlayError != EVROverlayError.None)
            {
                Debug.Log(overlay.GetOverlayErrorNameFromEnum(evroverlayError));
                base.enabled = false;
                return;
            }
        }
        SteamVR_Overlay.instance = this;
    }