Android Webview Texture (VR compatible)

Pitch

✨ This is a working Webview Texture for Android ✨
It also has been tested in VR ✅ and works well with both Google Cardboard SDK, Google Daydream SDK and GearVR.

It is very fast because unlike some plugins this is a GL texture and not a bitmap copy of the view.

Screenshots/videos

Screenshot (3D texture)

This Webview will act like a standard texture, usage are limit-less:

Checkout a working demo: APK demo

Video (VR mode)

I want to thank Oculus that open sourced a part of their SDK and it has been a great source of inspiration for me, also want to thank Felix Jones who help me to get things right.

Documentation

Limitations

This plugin require Android Kitkat 4.4 (API 19) or more.

⚠️ It has some limitations (but I’m working on it)

I am working to remove these limitations.

VR Configuration

Tested with Google Daydream and Google Cardboard
other VR SDK could work but there is no guarantee.

You must have a Google VR Unity version (-GVRXX) or use the last Unity beta (5.6)
Your build parameters (found in Build Settings > Player Settings) should look like this:

Events mechanism

The Webview will give you delegate messages for specific events:

you can parse these messages and handle it as you wish

Of course you can send touch event to the Webview, this will allow you to click links, scroll the view and much more.
➡️ A full working example is included.

Download

Checkout the extension on the Unity Asset store

Note that the JAVA part of the source code is included in the asset.
The included source code is licensed under the MIT license.

Copyright (c) 2017 Jérôme Gangneux

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Support

Ask your questions here: