- Home /
Problem in reading image from Disk for iphone
I am developing a unity app, in which i call webservice for image url and after getting those url, i call one by one url for image downloading and store those images onto disks, and after in some point i read those images from disks and show as texture, but i am getting problem in reading images. It show me Question mark on texture and when i dig more to find out problem i got that i am getting zero of image using www.size and text also nil using www.text. I am doing following for reading and writing images. Writing
if(wwwMarker.isDone){ File.WriteAllBytes(Application.persistentDataPath + "/"+ data.markerName + ".jpg", wwwMarker.bytes); }
Reading
if(System.IO.File.Exists(fileUrl)) fileUrl = (Application.persistentDataPath + "/"+ markerDataObject.markerName + ".jpg"); if(www.isDone) video.mIconPlane.renderer.material.mainTexture = www.texture;
But i am getting Question mark on as image on texture and size is also equal to zero, kindly help me where i am doing wrong. Thanks
It would help if you use the standard 101/010 when you format your code. Using the quotation button makes code difficult to read, and it cannot be fixed easily. This appears to be the same question I just answered:
http://answers.unity3d.com/questions/352506/how-to-set-image-on-texture.html