gree / unity-webview

zlib License
2.27k stars 687 forks source link

Webview only showing for a few seconds when shutting down VR device #709

Closed MaximeSchneberger closed 3 years ago

MaximeSchneberger commented 3 years ago

Hello, I've been following every step to show a webview in an android device, it works well on my smartphone, but when I try to launch the apk on my VR device (HTC Vive), nothing shows except the status message. The funny thing I discovered, is that when I shut down my VR headset while running the app, it will briefly show the webview when there is no coming back from the shutdown process, do you know if there are any security things on VR devices regarding webviews or other related things that are turned off when shutting down the device, hence enabling the view to briefly show ?

KojiNakamaru commented 3 years ago

This plugin just overlays native WebView views over the unity's rendering view and doesn't support 3D textured views and/or VR. Please check https://github.com/gree/unity-webview/issues/658#issuecomment-793636658 for other solutions.

What happens here may be the following: unity/HTC Vive middleware provides rendering views for two eyes, separated from the ordinal rendering view. WebView views are placed over the default view so they are hidden by these VR-specific rendering views when a VR headset is active and are displayed a bit when the VR headset is shutting down.