Unity OpenXR Meta regression: passthrough doesn't work when focus is lost and regained
Problem:
1. Passthrough initially works fine in the app.
2. Take the headset off, the display goes dark.
3. Put the headset back on, the display turns back on.
4. Unexpected: passthrough no longer works in the app!
Also, passthrough doesn't work in the first run after the app has been installed.
This is a regression. Passthrough always worked in the last version of the Unity OpenXR Meta package I used, which I think was 2.0.1.
Suspected Cause:
MetaOpenXRPassthroughLayer.Dispose() in the Unity OpenXR Meta package appears to be broken - it's not idempotent.
When Unity's OpenXRCompositionLayersFeature.OnSessionEnd() disposes it, the underlying resources are gone for good.
So when OpenXRCompositionLayersFeature.OnSessionBegin() creates a new one, it doesn't work.
Version:
Unity 6 (6000.0.51f1)
My selected XR plugin: Unity OpenXR Meta 2.2.0
Meta Quest 3
I think these packages are irrelevant to this problem, but including the versions anyway:
Meta XR Core SDK 77.0.0
Meta MR Utility Kit v77.0.0
Meta XR Platform SDK 77.0.0
