Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Adding in-game web browser for Unity Standalone builds

Discussion in 'Editor & General Support' started by RJproz, Jul 30, 2016.

  1. RJproz

    RJproz

    Joined:
    May 19, 2013
    Posts:
    52
    First of all, I know this topic is been discussed many times before. But every solution gets deprecated with time.
    I want to add web browser in my Steam game (Windows, Mac OS, and Linux) and so I am here looking for some suggestions from someone who has already done if before.

    Currently, I am using Power-UI which is a great plugin but still it falls short. (And I don't blame it because this asset is primarily for UI)


    Edit: I am just looking for a simple Web browser overlay (not something as Texture). Steam also has a Web browser and one can access it without closing the game (as overlay).

    Here are my results based on my search for a plugin:-
    - uWebKit is discontinued.
    - Coherent-UI seems promising but is very costly
    - Embedded Browser looks great. (But haven't used it yet) Supports Windows and Mac OS 64 bits. And even a 64-bit Linux port is partially completed.

    Any suggestions would be helpful.
     
    Last edited: Jul 30, 2016
  2. RJproz

    RJproz

    Joined:
    May 19, 2013
    Posts:
    52
    Edit: I am just looking for a simple Web browser overlay (not something as Texture). Steam also has a Web browser and one can access it without closing the game (as overlay).
     
  3. mdintaman

    mdintaman

    Joined:
    Jun 11, 2015
    Posts:
    3
    Embedded Browser uses CEF, which is what I believe Unity itself uses for the asset store. You could use the same approach if you wanted a custom solution, but keep in mind that if you use that approach you will have to work with the version on CEF that Unity uses as once it is loaded it can't be replaced be a newer version.

    Out of curiosity, what differentiates between an overlay and UI? If I was trying to replicate the Steam overlay, couldn't I just generate an alpha layer and a browser window?
     
  4. KulestarUK

    KulestarUK

    Joined:
    Aug 16, 2013
    Posts:
    269
    Hey there, PowerUI guys here - we get asked this question regularly (as like you said, PowerUI is specifically built for UI's and isn't designed for the general web; everything else is either hugely overpriced or very limited).

    If you want it to be actually in Unity, it generally has to be a Texture - Unity doesn't provide a way of creating a separate window other than Application.OpenURL which might be what you're looking for. (Side note: using target='_blank' on a link makes PowerUI do this, e.g. <a href='http://mysite.com' target='_blank'>Open in a window</a>). There are some platforms where you can work around it though and a great free example is Unity Webview

    It's also fairly straight forward to wrap an existing browser engine in the same way that Coherent does (it wraps webkit) - this would be the Texture route though; it has the advantage of being able to be in 3D space, but the disadvantage of being platform specific.
     
    hunter-baun likes this.