Why does this work fine on an Android device (and the editor) but not iPad?
string path = Path.Combine(Application.persistentDataPath, sTileName+".jpg" );
Debug.Log ( "LoadSavedTileFromDisk:"+path );
if ( File.Exists ( path ) ) {
ukGeoMenu.GetComponent<ukGeoMenu>().allowMouse = false;
byte[] data = System.IO.File.ReadAllBytes ( path );
TileTextures[tile].LoadImage(data);
TileTextures[tile].name = sTileName;
ukGeoMenu.GetComponent<ukGeoMenu>().allowMouse = true;
Debug.Log ( "Success!" );
returnTileTextures[tile];
} else {
Debug.Log ( path + " not found" );
return (Texture2D)Resources.Load ( "checker_offline_tile_not_found" , typeof(Texture2D));
}
I’ve copied the images (jpegs) to the Documents folder after the app is installed on iPad (using the flag Application supports iTunes file sharing – YES in Info.plist) , but it doesn’t find them.
(The files were copied into the folder using iFunbox).