// Use this for initialization void Start() { try { Input.GetButtonDown("RUISMenu"); } catch (UnityException) { ruisMenuButtonDefined = false; } inputManager = FindObjectOfType(typeof(RUISInputManager)) as RUISInputManager; enablePSMove = inputManager.enablePSMove; psMoveIP = inputManager.PSMoveIP; psMovePort = inputManager.PSMovePort; jumpGesture = FindObjectOfType(typeof(RUISJumpGestureRecognizer)) as RUISJumpGestureRecognizer; displayManager = FindObjectOfType(typeof(RUISDisplayManager)) as RUISDisplayManager; riftDisplay = displayManager.GetOculusRiftDisplay(); // TODO: This menu should work with any stereo view, not just Rift. riftDisplay.linkedCamera is null when Rift is disabled. if (oculusRiftMenu && riftDisplay && riftDisplay.linkedCamera) { windowRect = new Rect(riftDisplay.linkedCamera.leftCamera.pixelRect.x + riftDisplay.resolutionX / 4 - 100, riftDisplay.resolutionY / 2 - 220, 250, 250); } SaveInputChanges(); }
// Use this for initialization void Start() { try { Input.GetButtonDown("RUISMenu"); } catch (UnityException) { ruisMenuButtonDefined = false; } inputManager = FindObjectOfType(typeof(RUISInputManager)) as RUISInputManager; enablePSMove = inputManager.enablePSMove; psMoveIP = inputManager.PSMoveIP; psMovePort = inputManager.PSMovePort; jumpGesture = FindObjectOfType(typeof(RUISJumpGestureRecognizer)) as RUISJumpGestureRecognizer; displayManager = FindObjectOfType(typeof(RUISDisplayManager)) as RUISDisplayManager; riftDisplay = displayManager.GetOculusRiftDisplay(); // TODO: This menu should work with any stereo view, not just Rift. riftDisplay.linkedCamera is null when Rift is disabled. if (oculusRiftMenu && riftDisplay && riftDisplay.linkedCamera ) { windowRect = new Rect(riftDisplay.linkedCamera.leftCamera.pixelRect.x + riftDisplay.resolutionX / 4 - 100, riftDisplay.resolutionY / 2 - 220, 250, 250); } SaveInputChanges(); }