Android VR Webview Texture

Pitch

This is a working VR Webview Texture for Android (Unity asset).

It has been tested and works well with both Google Cardboard SDK and Google Daydream SDK.

It can also be used on non VR project as a classic Webview Texture (Android only)!

Limitations

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

I am working to remove these limitations.

Video demo

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.

Download

Checkout the extension on the Unity Asset store

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

This script takes advantage of the Unity Event System, so you must add an EventSystem to your scene (with default value) and also a Physics Raycaster on your main camera (with default value)

That way you can send touch event to the Webview, this will allow you to click links, scroll the view and much more.

You can find a working example here: https://gist.github.com/jrmgx/793fb62e575a63d08ac13b16cb34be19
This example is integrated in version 1.2 of the Asset.

Non VR example

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

Support

Ask your questions here: