- Home /
Question by
vickygroups · Apr 30, 2014 at 01:52 AM ·
iosscreenshotprime31
Saving screenshot to photo roll with Prime31
six hours later, here's the code. i'll paste it for the others who are stuck. note that this plug in comes with no tech support, and no sample code for the photo roll. i just read of a much less expensive plug in if you only need screenshots on your photo roll; note that i haven't tested it myself: https://www.assetstore.unity3d.com/#/content/7827
public class CameraButtonScript : MonoBehaviour { public int photoCounter; public string screenshotName;
void Start ()
{
photoCounter = 0;
}
void OnTap(TapGesture gesture)
{
audio.Play ();
screenshotName = "screenshot" + photoCounter + ".png";
StartCoroutine( EtceteraBinding.takeScreenShot( screenshotName, imagePath =>
{
EtceteraBinding.saveImageToPhotoAlbum (imagePath);
}) );
photoCounter ++;
}
}
Comment
I added yield return null; and got rid of the error, but it doesn't actually take a picture to the photo roll.
Your answer
![](https://koobas.hobune.stream/wayback/20220613143914im_/https://answers.unity.com/themes/thub/images/avi.jpg)