Search Unity

Displaying web page in Unity with overlaying UI?

Discussion in 'Editor & General Support' started by LucasJSR, Apr 25, 2022.

  1. LucasJSR

    LucasJSR

    Joined:
    Aug 15, 2020
    Posts:
    13
    Hi everyone,

    I need some help with an Android project I've been working on. Basically, I want to display a web page inside my app and also display some info as custom overlays (made with the Unity UI elements) on this web page. As Unity is unable to display web pages natively, I tried using two different webview plugins: unity-webview and UniWebView 4.

    While both of them worked well for displaying the page, both also render the webview over any other Unity object on the scene, which makes it impossible to overlay the web page with other info. I tried placing the webview on a different camera to be rendered before the main camera (which displayed the overlayed info), but the webview still covered the rest of the elements on the scene. Unity-webview does have an experimental implementation which enables the overlaying of Unity objects, but in this case the displayed web page cannot be interacted with.

    I'm specifically looking for a webview solution which enables the rendering of UI elements over the web page, while also allowing the user to interact with the web page. Does anyone know how I could achieve that?

    Thanks in advance.
     
    dedpp0524 likes this.