- Home /
BrowserTexture?
I want to use a webpage as a texture. How do I do it?
And is a pro licence required as it is for MovieTexture?
Answer by jashan · Feb 18, 2010 at 12:33 PM
Well, there's quite a few possible ways to do this. One is rendering the Webpage to an image on a Web server and then downloading that image in your game and displaying it. For that, the Pro Version is not required and it would also work with Web players. However, you need a Web server where you can do this, and you need to implement rendering the Web page into an image. For this, see for example Render HTML as an Image (there's a few solutions provided in the different answers so don't get discouraged by the first answer which doesn't have any info on that). Also, it will probably be quite tricky to implement interacting with the page - so it's "look, don't touch". Finally, flash or javascript on the page will most likely be ignored.
For an approach directly integrated into Unity, see bliprob's htmlTexture plugin. For that, however, you will need the Pro license - and as far as I know, as it's based on WebKit and Cocoa, this will only work on the Mac. However, bliprob is considering doing a Windows port for pay.
Thank you for your quick and competent answer! :)
Placing rendered html-pages will not work for me. Unfortuately I must develope under windows and for windows. I cannot understand why they do not integrate a webkit as a texture.
Now I have to think about using another engine. :(
You're welcome. I wonder if many game engines support HT$$anonymous$$L-rendering. It's not the kind of thing you usually need for game dev. One likely reason why they don't include this in Unity is because it would either bloat the Web player, or create dependencies on other software-packages. Both not really acceptable. If you're developing for the Web, I don't think there is an alternative at all - and if you create standalones, talk to bliprob, it's probably cheaper than developing it one your own (depending on how much money your time is worth, of course).
Your answer
Follow this Question
Related Questions
How would I go about getting the results of a javascript variable to a string inside script? 3 Answers
Is Unity a good fit for an embedded (web) model file browser? 1 Answer
Android : Open the phones web browser 1 Answer
Browser to webplayer communication problem 0 Answers
Capturing sound input with low latency 0 Answers