(Quest 2 - 4.27 - Android Vulkan) Goal was to increase UI resolution.
To catch anyone up on documentation, I watched through an older tutorial, read through the Unreal documentation, and a few other tutorials like this one to try and apply the concept to my own menu, which is already built out. The tutorials seem to start from a blank menu only, which makes troubleshooting problems hard.
When I tried to implement a StereoLayer as described above, I’ve been unable to properly control its scaling (it seems immune and there are too many places to set scale) and, more importantly, it refuses to be deleted. Ever. Each time I open the menu, a new one is stacked into the space. Even after I stop PIE, the menu persists into the SteamVR home space!
Destroying the actor which owns the StereoLayer component didn’t work.
Destroying the component directly doesn’t work.
Detaching the component before destroying it doesn’t work.
Setting the component’s visibility to off doesn’t work.
This feature is completely unusable to me. I wanted to implement it on an existing menu because the resolution of the default Widget is itself unusable. How do I fix this?
Which VR plugin do you have active? Stereo layers are implemented differently for each VR API and some of them may be missing features.
We’re using OpenXR, and I’m testing a Quest 2 over Air Link which is why SteamVR is present.
Someone else at my studio got StereoLayers to work for a simpler menu, but they started from scratch and were able to follow the tutorial more directly. I’ve tested their result over the same link as I’m testing mine. The feature should work, it’ just isn’t working for me and is doing so in a horribly buggy way.
I tried the version straight out of the Unreal documentation and that one persists into the SteamVR home space as well. It’s really weird. The documentation doesn’t appear to say anything about removing or deleting it safely once you’ve created it.
NOTE: I did just now realize that I can cut SteamVR out of the loop entirely by setting Oculus as the active OpenXR app. I don’t recall reading that as a necessary step and I’ve used SteamVR for so long that I never stopped to question it.
Looking at it, it seems like a combination of there not being anything that removes the stereo layer in timely manner, and SteamVR not removing composition layers until a new frame is rendered without it.
With my testing, the stereo layer does not destroy itself until a while after the component has been destroyed, and the BeginDestroy() method is called on it. If you end the PIE session and return to the editor, the OpenXR plugin stops rendering, and ends the OpenXR session while keeping the instance alive. Since the SteamVR runtime no longer receives new frames, it will just hold the information from the last frame and keep showing the composition layers until the instance is destroyed.
The component doesn’t seem to check whether it is active, or have any other clean way of toggling it or destroying it.
For a workaround, setting the Quad Size of the layer to 0 will hide it instantly, but it has to be done before rendering the last frame.
Edit: I posted about the SteamVR part of the issue on the Steam discussion boards: