I’m trying to load JPG files and display them with UNityGUI; the jpg file is load ad bytes from a .txt file. Till it runs on Unity on my Mac the image is red and displayed, but when I compile and run the code on my iPhone then a question mark appears instead of the image…
var dspTexture : Texture2D;
var imageTextAsset : TextAsset;
function Start(){
dspTexture.LoadImage(imageTextAsset.bytes);
}
function OnGUI(){
GUI.Label(Rect(0,0,480,320),dspTexture);
}
Anyone has an idea why this happens ?