Search Unity

Web browser (webkit) inside ios, android, and osx available for unity.

Discussion in 'Scripting' started by dansav, Sep 25, 2012.

  1. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    For those of you who have been wanting a web browser within unity there is an open source project I found that seems to work on ios, android, the editor, and osx. I'm wondering if people on this forum want to discuss it and expand it.

    https://github.com/gree/unity-webview
    To try it download the zip file. (see zip button near top of page)
    Open the sample.unity file in the folder sample->assets->sample.unity
    Then load the package in the dist folder into the project by clicking on it.
    Change the url in the inspector for samplewebview object to
    http://demos.dojotoolkit.org/demos/mobileGallery/demo-iphone.html
    or whatever url you like.

    Here's info about previous or similar projects as far as I know.
    1. This one: osx, osx editor, ios, android, you can interact and communicate back and forth to unity. It appears as an overlay in front of unity. I don't think it can appear and interact as a texture2d.
    2. Uwebkit: webkit in ios pc mac you get source code for ios with purchase. Not sure how many people are using it. No Android plans. Can appear as static on texture2d but not dynamic -- you can't interact with it in the 3D world on ios. Not sure about pc mac interaction as texture2d.
    3. Awesomium: doesn't run on ios as far as I can tell only pc and mac.
    4. Berkelium: not sure if it works at all on unity.
    5. StinkBot's HTMLTexture -- disappeared but was the only one who managed to put it on a texture and get it to interact. Where is he?
    6. Prime31: html viewer as part of etc package. Very simple just shows a webpage.

    I have lots of questions to ask if someone knows more about this project and wants to discuss it. I've been following these projects for a few years and have experimented with a lot of them. I'm primarly a unityscript programmer don't know anything about obj-c.

    Have fun,

    Dan
     
    Karsnen_2 and Kaihyo like this.
  2. antiping_Unity

    antiping_Unity

    Joined:
    May 31, 2011
    Posts:
    22
  3. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    211
    i've user Uwebkit on mac and win..adn works great. now i need a JS bridge within iOS
    so i am working with this one.. i'll keep you updated!
     
  4. Russel

    Russel

    Joined:
    Oct 12, 2011
    Posts:
    40
    Can I use the Android-Back-Button in the gree unity-webview? How can I implement the back-handling (WebView hierarchy)?
    Thanks for your help.
     
  5. Doning

    Doning

    Joined:
    Mar 15, 2013
    Posts:
    1
    Hey Dan,

    Did you settle on a particular web browser plugin in the end? We're also trying to determine which would be the best option to use. We were looking for something with well maintained, robust and good cross-platform support.

    Thanks for any feedback on your experience with this.
     
  6. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    Any update on this?

    There's apparently a thread about Awesomium iOS on awesomium answers but no download link

     
  7. Tony-Sparrow

    Tony-Sparrow

    Joined:
    Feb 22, 2014
    Posts:
    3
    Can I get current URL of webview on IOS, and how?
     
  8. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    I've just noticed that using the scheme of the gree webkit to unity communication that you can only send one message from javascript in a function to unity at a time or the other one is lost. Has anybody noticed this, or know a workaround.
     
  9. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    Anybody know a way to get the html src code for whatever page is currently loaded in webkit?
     
  10. Amirjaouani

    Amirjaouani

    Joined:
    Jun 7, 2017
    Posts:
    1
    I can't find the url of samplewebview object in the inspector
     
  11. scarffy

    scarffy

    Joined:
    Jan 15, 2013
    Posts:
    25
    I found this plugin which also can work for local file. Perhaps someone who visit this thread have interest in this.