Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

VR camera control for automated testing

Discussion in 'AR/VR (XR) Discussion' started by kerede, May 13, 2020.

  1. kerede

    kerede

    Joined:
    Apr 3, 2013
    Posts:
    9
    I'm working on a solution to record VR input and replay it for automated testing. Serializing and recording the data isn't too difficult. But I'm having trouble overriding the transform of the main camera during playback. I know I could set the Target Eye to Main Display, but I want to mimic the real performance considerations as closely as possible (so I want to control the stereo camera). I've tried updating the transform in LateUpdate (no effect) and PreCull. PreCull almost works, except that the scene has already been culled at this point. It makes me wonder where cull is being called for VR...

    Is there an accepted way to override the transform of the camera for this use case? No user will be putting the headset on, I do realize that would make you sick. This is just for automated testing. Thanks!