- Home /
Ios www.texture returns question mark
I`m currently working with Unity 5. I try to downlaod an image using www.texture but when i apply that texture to a cube it gives question mark. It works fine on windows and on android
public string url = "https://dev.metaio.com/fileadmin/user_upload/images/junaio/quickstarts/quickstart-qr-g2.png";
private IEnumerator loadImage(GameObject page, string urdl)
{
WWW www = new WWW(urdl);
yield return www;
page.GetComponent<Renderer>().material.mainTexture = www.texture;
}
void OnGUI()
{
if (GUILayout.Button("Go!"))
{
StartCoroutine(loadImage(cube, url));
}
}
I have seen this issue recently it seems that some .png images are not recognised by unity. Try to reconvert the image or use another one.
(try to save that image and put it in your asset folder, unity does not import it?)
Hi V-Jankaitis: I get the same problem,I get question mark too in ios device. If you solve it, please help me, thank you.
Answer by V-Jankaitis · May 05, 2015 at 05:50 PM
Solved (king of) Chose different image to download and worked fine. the only thing we managed to determine is that images is a layer works, the ones without layers don`t Don`t work:
https://dev.metaio.com/fileadmin/user_upload/images/junaio/quickstarts/metaioMan.jpg
https://dev.metaio.com/fileadmin/user_upload/images/junaio/quickstarts/quickstart-qr-g2.png
Work: http://i.stack.imgur.com/kS9Kf.png http://www.queness.com/resources/images/png/apple_raw.png http://vignette4.wikia.nocookie.net/fantendo/images/c/cc/Purple_Yoshi_YBA.png/revision/latest?cb=20111220164000
Hi, V-Jankaitis:
string url = "https" + "://graph.facebook.com/" + FB.UserId + "/picture";
url += "?type=large&access_token=" + FB.AccessToken;
url.Replace("https://","http://");
WWW www = new WWW(url);
yield return www;
profilePic = www.texture;
I have already change url string https to http, but it not work too.
I use unity facebook sdk to get user profile picture!
Your answer
Follow this Question
Related Questions
WWW class downloading image doesn't work in Web Player? 1 Answer
How to load interlaced streamed image into a texture? 0 Answers
WWW 16 bits textureformat download possible? 2 Answers
Can I access previously downloaded textures? 2 Answers
Can you instruct a game to download textures and write these textures into the game for next time? 1 Answer