I am loading a texture from the iphone disk but I am always getting a question mark or black texture. On the editor works perfect. Here is my code:
What am I doing wrong? The texture is a png and in RGB24 and everything just looks fine!!
You need to wait for the download to complete -- even though the file is on your local disk, there is still time involved to access the file system and load the texture, and the WWW class goes through its normal asynchronous operations.
You should run the code fragment above in a coroutine, and "yield www;" to wait for it to finish.
See the docs for more info.
answered Apr 14 '11 at 05:03 PM