- Home /
www not loading from image file
When I use www to load a texture image it works fine if I load a random image from the web, but when I load the image from my hard disk with the file protocol it returns a white texture with a red question mark instead. Can someone explain to me what properties my texture files should and shouldn't have, or an alternative to the texture files being the problem?
I've loaded files using the file:// protocol, so I know it can work. What file format are you using? If you put the file in your Assets folder does it import correctly?
Answer by Dunkhan · Jan 19, 2011 at 10:51 AM
http://answers.unity3d.com/questions/36920/my-textures-arent-working
This was answered on the other question I posted. Thankyou to all who helped. Unity doesn't support bmp files
Answer by _MGB_ · Jan 18, 2011 at 02:57 PM
Are you using an absolute or relative path to the file? It appears to need an absolute one including the drive letter (e.g. using Application.dataPath).
I am using an absolute path, in addition it gives me a failure error when it cant find the file so it is finding the file
I also tried replacing " " in the path with "%20" with no effect
Answer by KrisCadle · Feb 25, 2012 at 02:57 AM
Also, you do have to add the "file://C:/ - so your var should look like this
var url = "file://C:/Desktop/yourImage.jpg";
Your answer
Follow this Question
Related Questions
Possible to load image from desktop not url 3 Answers
Load external mp3 File without streaming 1 Answer
load csv www 0 Answers
Can't play two audio with same clip by WWW 0 Answers
Downloading image from the server crash the game in Android Device ? 1 Answer