void LateUpdate() { if (!VRSetup) { return; } DoUglyCameraHack(); if (VRInput.GetActionDown(InputAction.Aim)) { if (watch) { watch.SwitchState(); } //UIVisible = !UIVisible; //VRGlobal.ClearUIRenderTex(); //PlayerGui.SetVisible(UIVisible); //PlayerGui.Inventory.SetVisible(UIVisible); // PlayerGui.m_playerStatus.SetVisible(UIVisible); //PlayerGui.m_compass.SetVisible(UIVisible); } UpdateOrigin(); }
public void Start() { if (VRInput.instance != null) { Debug.LogError("Trying to create duplicate VR_Input class! -- Don't!"); return; } VRInput.instance = this; InitializeActionMapping(); VRInput.Initialized = true; Debug.Log("Input initialized"); }
void Update() { if (overlayHandle != OpenVR.k_ulOverlayHandleInvalid) { var texture = new Texture_t(); texture.handle = UI_ref.m_UIRenderTarget.GetNativeTexturePtr(); texture.eType = SteamVR.instance.textureType; texture.eColorSpace = EColorSpace.Auto; OpenVR.Overlay.SetOverlayTexture(overlayHandle, ref texture); if (VRInput.GetActionDown(InputAction.Crouch)) { OrientateOverlay(); } } }