- Home /
Is it possible to open a web page inside Unity?
Hi I was thinking of building a cut down version (as a test) of my website with Guis using Unity IOS (indie). I like the potential of exporting it out to multiple platforms (looking at getting IOS & Android Pro) and the potential to then be able to do more things with it in the future that a normal site could not on iDevices. I was wondering if a Gui window or some kind of frame could access a specific part of a page on my site? The only thing I could find was Application.GetURl but that opens safari on the iPhone. Is this possible? Thanks In Advance
You want to use a GUI window in Unity to show your webpage content? If so, then you probably need to create a sort of parser to do this. To get the content from the page, hm, you could probably create a javascript on the page to get the content, but thats a wild guess. Webprogram$$anonymous$$g is really not my area of expertise :)
Answer by yoyo · Dec 29, 2010 at 06:56 PM
The WWW class can retrieve the contents of a web page, but you will still need a way to parse and render it. There's also the System.Web namespace, which appears to exist in Mono (I can put "using System.Web;" in a script) but I haven't tried to do anything with it.
Answer by burnumd · Dec 29, 2010 at 06:58 PM
See this question and answer. It describes pulling down HTML content (which would work the same in iOS, standalone and webplayer). You still need to parse and render the content yourself, but it works fine for things like RSS feeds, etc. If you specifically want bloggy-type content, there's already an RSS parser available.
That's fantastic everyone! Thanks a lot! Already pulled a pic off the net onto a cube so great start!
Yeah, if you just want to pull images and stuff, WWW is ideal. You can also communicate with servers via PHP (or your preferred CGI language) to get dynamic data.