Question mark instead of screen when trying to show image

Hi. I have just tried to post but i lost everything so i must write again :frowning:
I have a strange problem when i try to show some screens downloaded from the net. I dont think that there is problem in the code as almost every screen works. 4’th screen from the code down below is showing me question mark. My app is preety populated with screens and other stuff. I have just tried following code on a new project and everything is working. So the problem is: why sometimes my texture is question mark instead of image?

I had similar problem since i have learned WWW class. I had many textures in a array and every screen had it’s personal texture. Everything was loading fine when downloaded and assigned image for a texture for a first time. the problem was when i clicked back and image was downloading for the 2nd time. Then instead of image i had question mark. When i did this once again: tada…image was loaded ok…so it was strange, as every 2 times it has showed question mark. I have managed to omit this problem by using "if (teksturesscreeny[7].width <= 20) " so once the image was loaded it would prevent from downloading it again. Yes…it’s not bad…it is working good, but what if user will want to search throught some games and load 30 screens? That’s why i’m experimenting with loading images to a single texture from bytes so i can exchange it everytime i want.

Anyone know why i have this strange behaviour? How i can prevent it?

var wwwbytes : WWW;
var texturesample : Texture2D;
var screen : GameObject;


function Start () {
	  wwwbytes = new WWW ("http://freeappisland.com/img/200_3.png");
   yield wwwbytes;
   texturesample.LoadImage(wwwbytes.bytes);
   screen.renderer.material.mainTexture = texturesample;
   testing();
   }
   
   function testing() {
	yield WaitForSeconds(10);
 wwwbytes = new WWW ("http://freeappisland.com/img/213_3.png");
   yield wwwbytes;
   texturesample.LoadImage(wwwbytes.bytes);
      screen.renderer.material.mainTexture = texturesample;
      //Resources.UnloadUnusedAssets();

      yield WaitForSeconds(10);
 wwwbytes = new WWW ("http://freeappisland.com/img/211_3.png");
   yield wwwbytes;
   texturesample.LoadImage(wwwbytes.bytes);
      screen.renderer.material.mainTexture = texturesample;
	yield WaitForSeconds(10);
// number 4. This one shows question mark
 wwwbytes = new WWW ("http://freeappisland.com/img/212_3.png");
   yield wwwbytes;
   texturesample.LoadImage(wwwbytes.bytes);
     screen.renderer.material.mainTexture = texturesample;
      yield WaitForSeconds(10);
 wwwbytes = new WWW ("http://freeappisland.com/img/189_3.png");
   yield wwwbytes;
   texturesample.LoadImage(wwwbytes.bytes);
      screen.renderer.material.mainTexture = texturesample;

   }
1 Like

when using LoadImageIntoTexture i have the same problem.

1 Like

me too…did somebody resolved this?

1 Like

Yeah did you guys resolve this?

1 Like