- Home /
Getting the background of an html page to a texture in unity?
Right so im not really new to unity but i know nothing about webpages and server stuff
but im wondering if theres a way i can make a texture in unity that loads the background image from redditp.com?
im aware of the WWW.LoadImageIntoTexture command but that only works for .jpg. is there a way i can write a script that does this?
I think the WWW class could be Unity's contribution to the solution. To take the load of rendering a webpage into an image off of your smartphone you might want to program something that runs on a server you can request the image from then. Since Unity does not support webbrowser capabilities by default you'll have to do work here :/
I did a quick search on google and found this:
http://www.developerfusion.com/code/4712/generate-an-image-of-a-web-page/
Answer by Sisso · Feb 12, 2015 at 12:33 PM
Almost everything is possible, with a lot of work :P
HTML is a simple text file, you need to parse, find the image, resolve its url and load as texture.
There is many ways to create a background image, using directly url or css (yes, one more thig to learn). Will need some hacks, but it should work.
Learn HTML and CSS http://www.w3schools.com/
Your answer
![](https://koobas.hobune.stream/wayback/20220613183047im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Change texture of RawImage 2 Answers
Image is normal in scene view but in game view it looks pixelated. 0 Answers
Uploading Unity to Website 1 Answer
flash site 1 Answer
How to access color & texture functions of a "RawImage Script" simontaneously?? 0 Answers