NatShare
Search…
Saving to the Camera Roll
Capturing the Best Moments
NatShare also supports saving images and other media to the camera roll. The SavePayload exposes this functionality:
1
// Create a save payload
2
var payload = new SavePayload(album: "My Awesome App");
Copied!
You can optionally specify an album name where media will be saved.
The payload is a write-only collection of items to be saved to the camera roll. Currently, the payload supports images (Texture2D) and media files (with file paths):
1
// Add image
2
payload.AddImage(texture);
3
// Add a media file
4
payload.AddMedia("/path/to/video.mp4");
Copied!
Once all the items have been added to the payload, they can then be saved to the camera roll:
1
// Save to the camera roll
2
var success = await payload.Commit();
Copied!
Last modified 3mo ago
Copy link