Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Switching default 'Camera' and 'OVR Camera' during play mode for mixed PC & VR app

Discussion in 'VR' started by fabi_s, Dec 6, 2023.

  1. fabi_s

    fabi_s

    Joined:
    Jan 25, 2021
    Posts:
    11
    Hello Unity Community,

    I'm currently working on a mixed PC and VR application and have encountered a challenging issue that I'm hoping to get some insights on from the experienced Unity developers here.

    The Application:
    The app is designed to initially open on a PC, displaying a UI component that allows the user to choose a video file from a specified directory. Once a file is selected, the goal is for the video, which is in 360-degree format, to play directly on the VR headset.

    The Problem:
    To facilitate this process, I've deactivated 'Initialize XR on Startup' so that the initial UI component can function correctly on PC. In the scene, I've placed two GameObjects containing the different cameras: the default Camera (enabled) and the OVR Camera (disabled). The idea is to switch between these cameras when the user confirms their video selection. However, I'm facing an issue where, after pressing the confirmation button, only the audio plays through the headset, while the video does not display.

    Troubleshooting Steps:
    • Camera Setup: Both the default Camera and the OVR Camera are in the same scene. The default Camera is enabled initially, and the OVR Camera is disabled.
    • Switching Mechanism: Upon user confirmation, I'm enabling the OVR Camera and disabling the default Camera.
    • Current Outcome: Player view remains in 'waiting' room of oculus link. The audio from the video is playing through the VR headset, but the video itself isn’t visible.

    Seeking Suggestions:
    Could there be specific settings or configurations within the Unity environment that I might be overlooking?
    Are there alternative methods or best practices for achieving this camera switch?

    I appreciate any guidance or insights you can provide. This challenge has been a significant hurdle in my project, and I'm eager to find a solution. Thanks a million in advance!