Hi,
When writing tests for an OpenXR application (with XR behavior mocked using Moq, etc.), the application fails during testing due to a Lock Input to Game View issue. In Editor, this is easily resolved by going to Window → Analysis → Input Debugger → Options → Lock Input to Game View, but in headless Playmode tests built using a CI pipeline, this seems impossible.
Is this a bug? If not, is there any way to force a CI build to run tests using OpenXR without encountering this error? For example, is there a launcher option that can force input to lock to Game View? Otherwise, where is this option stored, and how can I ensure that tests don’t break due to this?
@rtartakovsky ,
What version of the InputSystem package are you using? I would recommend updating to the latest (1.3.0 currently). The Lock Input to Game View settings was moved to project settings from the Input Debugger window. You should be able to adjust this via the Edit > Project Settings > Input System Package and the updated setting is Play Mode Input Behavior (at the very bottom of the list). Here is some more info.
I would look here first and see if adjusting this or even modifying the project settings file during your CI run might get you where you want to go with it.
@VRDave_Unity ,
That was it, thanks. Updated to Input System 1.3.0, switched Play Mode Input Behavior to All Device Input Always Goes To Game View, and the CI successfully built and ran the tests like a charm, no errors. Thank you for the help!