Loading overlays for Windows Mixed Reality in Unity
It seems that Steam and OVR plugins in Unity ship with a script that can be used during transitions (scene change, load behavior, etc.) to display overlays (instead of the screen going all dark). This is a pretty useful out-of-box script that anyone can use while developing their games.
Attached are the scripts.
Can we do something similar for Windows MR, so that not everyone has to write one from scratch?
@subzero110 - In the Dev_Unity_2017.2 branch, in the Utilities/Scripts area, there is a fadescript script. Check that out and see if that is similar to what you are talking about, or maybe that's what we need to extend for this.
I'd like to second that request. The FadeScript seems to be something else. What we are talking about, as implemented in Steam and OVR, is the ability to set an image (i.e. a Sprite in Unity) to be displayed on the HUD of the headset without any Unity involvement. (In Steam and OVR, the image is displayed only on the HUD (not in the mirror view), so I believe it is a rather low-level access mechanism).
This is super-helpful for displaying loading screens in-between scenes. I.e. you fade out, display that image, and then load a new scene (synchronously) in Unity, all the while only displaying the loading image, no hickkups. When the loading is done, you remove the image and fade in your scene. The loading screen is thus independent of any one scene.
In OVR:
OVRPlugin.SetOverlayQuad(isOverlayInsteadOfUnderlay, isHeadLocked, nativeTexture, nativeTexture, IntPtr.Zero, pose.flipZ().ToPosef(), scale.ToVector3f());
In SteamVR:
OpenVR.Overlay.CreateOverlay(key, overlayName, ref loadingScreenOverlayHandle);
This is currently one of the things holding us back in porting our Vive/Rift game to the Windows Store; we are looking into workarounds, but this would be a great addition for the WMR toolkit.
One other thing to keep in mind is that if we add anything to the Mixed Reality Camera Parent then we also need a way to disable this overlay so it doesn't impact performance.
@StephenHodgson @jessemcculloch I've noticed that the Haptics implementation only works at runtime, and by directly calling Windows API. Is there any way to do something similar for a screen overlay? If there are classes in the Windows API which can do this I'd really appreciate a tip. Thanks.
I've not found a workaround for this, and the issue with Unity Scene loading is that, whether using additive or not, or asynchronous loading or not, the WMR headset blanks out during the scene loading process which makes the user wonder whether the app has crashed (our scene takes ~10 second to load). I've posted about this here: https://forum.unity.com/threads/vr-camera-additive-scene-loading-previous-scene-doesnt-stay-visible.505732/
I'm also looking for a way to do this.
@StephenHodgson I am still interested in this feature - any updates?
None yet
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.