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

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.

  • 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.
  • 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.
  • Awesomium: doesn’t run on ios as far as I can tell only pc and mac.
  • Berkelium: not sure if it works at all on unity.
  • 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?
  • 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

2 Likes

very good ;););):wink:

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!

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.

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.

Any update on this?

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

Can I get current URL of webview on IOS, and how?

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.

Anybody know a way to get the html src code for whatever page is currently loaded in webkit?

I can’t find the url of samplewebview object in the inspector

I found this plugin which also can work for local file. Perhaps someone who visit this thread have interest in this.