Loading images from the device at runtime?

Is this even possible?

Could the user create an image of the correct size and format, (for an in game avatar, perhaps), and if saved in a specific location on the device, can I load it in and use it in game?

bump?

At this time, no. Perhaps via a plugin like the Unity iPhone Enhancement Pack, or by writing your own.

There’s no place your game can read files from except (a) your app’s document directory and (b) the device’s image gallery. The problem with (a) is that no other app can save into it. The problem with (b) is that it’s not a file location, it’s an API. You display the image gallery, and it passes back the UIImage that was selected. That is to say, you get a bitmap, not a file reference.

The Enhancement Pack shows the image gallery and saves the returned image (as a JPG IIRC) to a file in the documents directory, and returns the filename to your Unity code. You can then load the selected image through your Unity script and apply it to a material or whatever.

I guess there’s a third place you can read from – (c) the internet. That’s always an option too.

Thanks guys, sounds like I will have to do some more research.