Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Android VR Webview Texture

Discussion in 'Assets and Asset Store' started by jrmgx, Mar 13, 2017.

  1. jrmgx

    jrmgx

    Joined:
    Oct 21, 2016
    Posts:
    41


    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)
    • You can only have one VR Webview on your scene
    • It works only for Android (no preview available on the Unity Editor) not working on iOS,
    • The Webview itself is not hardware accelerated — read this it is important — it means that no WebGL websites will work, and more important, most video won’t play (because they often use hardware rendering to play)
    I am working to remove these limitations.

    Video demo


    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:
    • onPageStarted:string => when a new url is about to be loaded
    • onPageFinished:string => when a new url has finished to load
    • onReceivedError:string => when an error happen
    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: https://jerome.gangneux.net/projects/2017-02-android-vr-webview/#support
     

    Attached Files:

  2. aubrey4president

    aubrey4president

    Joined:
    Apr 16, 2019
    Posts:
    2
    Posting this here for people looking for a webview plugin like I was. This asset's no longer in the asset store, so I found this 3D webview unity asset that I use now.
     
  3. Ismawell

    Ismawell

    Joined:
    Oct 19, 2018
    Posts:
    4
    Stop promoting that horrible thing, there is spam of it in every VR related forum