I am using Unity4.3.2f1 trying to display a public domain picture in my app. I copied these code from the Unity tutorial:
//
public var url = “File:Honeybee landing on milkthistle02.jpg - Wikipedia”;
function Start () {
renderer.material.mainTexture = new Texture2D(1060, 1067, TextureFormat.RGB24, false);
// Start a download of the given URL
var www = new WWW(url);
// wait until the download is done
yield www;
// assign the downloaded image to the main texture of the object
www.LoadImageIntoTexture(renderer.material.mainTexture);[/url]
}
function Update () {
}
//
I attached this code to a Plane, after running the code, no error shown and the plane texture shows a very strange pattern and when I click on the image, it pops up a question mark…I also tried DXT5, same problem.
I am using Android build, any suggestion will be appreciated. Thanks in advance.