Open geoabensur opened 8 years ago
This plugin overlays system-provided webviews as is on unity's rendering and doesn't support the side-by-side/spherically-distorted display. An easy way might be to prepare some special web pages (cf. http://through-the-interface.typepad.com/through_the_interface/2015/01/integrating-web-based-vr-samples-into-a-native-google-cardboard-app-using-the-cardboard-sdk-for-android.html ). We could extend the plugin to generate webview textures as below, theoretically, but it would take long and the implementation would tend to be tricky...
https://www.assetstore.unity3d.com/jp/#!/content/29346 EasyWebViewTexture For Android
Though I haven't tested, this might help.
working on this project for android, it's a bit slow because it uses the cpu but hopefully will transfer to the GPU in the future. Btw, thanks @KojiNakamaru for the tips above, I followed them closely except the OpenGL stuff which will come in the future.
@IanPhilips Thank you for sharing a nice project. Though you may already know, the followings should be useful to proceed further (I bookmarked them before but haven't been able to try yet).
https://coderwall.com/p/6koh_g/rendering-any-android-view-directly-to-an-opengl-texture https://github.com/ArtemBogush/AndroidViewToGLRendering
Been looking at these links, super useful! No progress yet, though. Any interest in pursuing 3D+VR rendering?
For other solutions, you can check https://github.com/gree/unity-webview/issues/612#issuecomment-724541385.
Just got pinged with the comment updates, my project works very well now. It's no longer based on the cpu and instead uses the gpu. You can watch videos, etc. in 3D. https://github.com/IanPhilips/UnityOculusAndroidVRBrowser
Just got pinged with the comment updates, my project works very well now. It's no longer based on the cpu and instead uses the gpu. You can watch videos, etc. in 3D. https://github.com/IanPhilips/UnityOculusAndroidVRBrowser
Hey Ian! I discovered your project not very long after my comment, do you have any contact information? I made a UI and keyboard for it
@clovelt any reason you can't submit a PR or issue on the repo? iansphilips@gmail.com
https://www.assetstore.unity3d.com/jp/#!/content/29346 @KojiNakamaru this link is either broken or somehow not working for me.
@geoabensur Could you please clarify what you mean by 'not rendered properly'? I'm encountering a series of errors when loading the sample(SampleWebView) scene from another scene on Quest 2:
NullReferenceException: Object reference not set to an instance of an object. at UnityEngine.Transform.TransformPoint (UnityEngine.Vector3 position) [0x00000] in <00000000000000000000000000000000>:0 at Oculus.Interaction.Input.TrackingToWorldTransformerOVR.ToWorldPose (UnityEngine.Pose pose) [0x00000] in <00000000000000000000000000000000>:0 at Oculus.Interaction.Input.Controller.TryGetPose (UnityEngine.Pose& pose) [0x00000] in <00000000000000000000000000000000>:0 at Oculus.Interaction.Input.Visuals.OVRControllerVisual.HandleUpdated () [0x00000] in <00000000000000000000000000000000>:0
NullReferenceException: Object reference not set to an instance of an object.
at SampleWebView.
NullReferenceException: Object reference not set to an instance of an object.
at SampleWebView.
For those seeking VR-compatible solutions, I recommend checking out the following repository: https://github.com/TLabAltoh/TLabWebViewVR
I would like to know if unity-webview has support to render pages in VR handsets like GearVR. I have included this plugin in my unity VR app and webview was not rendered properly. Is there any plan to include it as texture or something like that? Thank you very much