What does "Mock Runtime" exactly mean?

From the OpenXR Plugin 1.0.3. doc:

Mock Runtime (Note: Enabling this will take over whatever current OpenXR runtime you might be using.)

I am pretty new to everything and was playing around with the rendering pipelines and VR, when I found that with a fresh project on the Built-In pipeline I just see a black screen on the game view when going into play mode with the Oculus not mounted, while on the other pipelines it always worked right away.
In order to have it work on Built-In, I either have to use the Oculus plugin in the XR Plug-in Management or enable “Mock Runtime” under the OpenXR settings when using OpenXR plugin.

I am using a Rift CV1 and Unity 2021.1.22f1

A quick search didn’t bring up much about this option. Maybe someone here can explain a little bit more? What does it do and why is it different between the rendering pipelines or is it not even supposed to be like this?

1 Like

Well, first of all you should clear your confusion about the name. So you should learn to understand what a mock / mock object is in general. A mock is a replacement of any kind of system that has the same interface as the actual object, but is just a fake replacement usually for testing.

When you read the documentation about Unity’s Mock CR plugin it essentially tells you the same thing. To quote the first paragraph:

The Mock HMD XR Plugin enables you to build VR applications without a device.
It provides stereo rendering support by mimicking the display properties of an HTC Vive HMD.