- Home /
LoadImageIntoTexture function on webplayer
Hi everyone, I am having hard times with LoadImageIntoTexture function on webplayer. While it is working just fine on editor mode(my images are loaded and i can see them on screen...), it simply cannot display them on the webplayer(i see a question mark). Here is the code of the function where it is used :
var textures : Texture2D[]; //Gallery
var textureNames : String[]; //url
function LoadImage () {
textures = new Texture2D[textureNames.Length];
for(var t=0; t<textureNames.Length; t++)
{
textures[t] = new Texture2D(16, 16, TextureFormat.DXT1, false);
Debug.Log("requesting from "+textureNames[t]);
// Start a download of the given URL
var arwww = new WWW(textureNames[t]);
// wait until the download is done
// yield arwww; // also it doesnt show my images with yield!
// assign the downloaded image to the main texture of the object
arwww.LoadImageIntoTexture(textures[t]);
}
}
is the WWW call pulling images from the same location as the .unity3d file that represents the webplayer project? If so perhaps the security model is stopping the download in the webplayer version(which would be different then downloading using the desktop stand alone).
http://docs.unity3d.com/$$anonymous$$anual/SecuritySandbox.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613150020im_/https://answers.unity.com/themes/thub/images/avi.jpg)