- Home /
www.texture different in editor and on webplayer
Basically Im downloading a texture from my server. Works perfect in editor, texture comes back as seeminly random pixel colors on web player. I threw in some debug information and found the number of bytes in editor of the texture is over 50000, and the width and height is 160 x 200 (same as the file on my server)
In web player though, the bytes are only around 200 and the width and height are 8 x 8.
Any reason for this? And any ways to fix this?
Here is the code im using
IEnumerator DownloadTextureFromUrl(string url) { download = new WWW("www.j3gaming.com/pat/Test/Jeans1.png");
yield return download;
Material tempMat = new Material (foundItemShader);
IEnumerator DownloadTextureFromUrl(string url) { download = new WWW("www.j3gaming.com/pat/Test/Jeans1.png");
yield return download;
Material tempMat = new Material (foundItemShader);
ScreenLog.AddMessage(download.texture.EncodeToPNG().Length + " " + download.texture.width + " " + download.texture.height);
Texture2D tex = new Texture2D(160, 240, TextureFormat.ARGB32, false); download.LoadImageIntoTexture(tex); mat.renderer.material.mainTexture = tex;
ScreenLog.AddMessage(tex.width + " " + tex.height); }
Your answer
Follow this Question
Related Questions
www download strange...help 0 Answers
WWW Class behaves strangely on iOS 3 Answers
WWW class downloading image doesn't work in Web Player? 1 Answer
Ios www.texture returns question mark 1 Answer
www.texture textureType to GUI 0 Answers