- Home /
 
loading different image links into a list
I am trying to make a list of images, these images are URLs that are passed to a loop that displays them. The problem is that it shows the list of images but, they are all the same image, as if the URL is not changing. I used the Debug.Log("") to check if the URL changes or not, and actually it changes, i don't know why they are appearing as the same image. Here's a snippet of my code
  void OnGUI()
     {
         string TheReturnedString = null;
                    
                 if (wwwTwo == null)
             {
                 string targetFile2 = "http://digiarts.se/Diwan/getNR.php";
                
                 wwwTwo = new WWW(targetFile2);
             }
             else if (wwwTwo.isDone && TheReturnedString == null)
             {
                 TheReturnedString = wwwTwo.text;
            
             }
                     string[] mainString = TheReturnedString.Split('~');
 
         for(int i =0;i<3;i++){
             string[] Values = mainString[i].Split('%');
         
                 BookPic = Values[0];
                 BookImageLink = "http://digiarts.se/Diwan/img/" + BookPic + ".jpg";
         
             // Book Image
         
                 if (www == null)
         {
             www = new WWW(BookImageLink);
                 
         }
             else if (www.isDone && BookImage == null)
         {
             
             BookImage = new Texture2D(200, 200);
             www.LoadImageIntoTexture(BookImage);
                 
         }
             else{
                 GUI.Label(new Rect(20, (i*195), 180, 180), BookImage);
         }
 }
 }
 
               Can anyone help me ?
Thanks in advance
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
WWW.texture with a wildcard in the URL 1 Answer
How to load an image in flash build? 1 Answer
Loading a higher resolution image into Unity than what is supported 0 Answers
How to assign texture from url 1 Answer
www download strange...help 0 Answers