Save Texture2D (Image) on Mobile (iOS)

Hello,

I have a system that dynamically generates and edits images taken from the mobile camera device. I want to be able to save this image within the app so the user can always load them back up later.

I DON’T mean to literally save the photo within the users photo library. I simply want to save the image within the app. I’ve been looking around and it seems way too complex just to be able to save some form of data.

The only method I can really see, is to convert the image into pixel data, and save it within a PlayerPrefs. There’s got to be a simpler way then that, surely? I also tried using ‘persistentDatapath’ but that just comes up with access denied.

Thanks.

See this one: http://docs.unity3d.com/ScriptReference/Texture2D.EncodeToPNG.html, i.e. EncodeToPNG and then File.WriteAllBytes to Application. persistentDataPath