// For Save IEnumerator CaptureScreen() { yield return(new WaitForEndOfFrame()); // Save to PhotoLibrary Texture2D screenShot = ScreenCapture.Capture(); if (saveAsPng) { bool withTransparency = false; if (withTransparency) { // PNG with transparency LoadTextureFromImagePicker.SaveAsPngWithTransparencyToPhotoLibrary(screenShot, gameObject.name, "OnFinishedSaveImage"); } else { // PNG LoadTextureFromImagePicker.SaveAsPngToPhotoLibrary(screenShot, gameObject.name, "OnFinishedSaveImage"); } } else { // JPG LoadTextureFromImagePicker.SaveAsJpgToPhotoLibrary(screenShot, gameObject.name, "OnFinishedSaveImage"); } }
// For Save IEnumerator CaptureScreen() { yield return(new WaitForEndOfFrame()); // Save to PhotoLibrary Texture2D texScreenShot = ScreenCapture.Capture(); LoadTextureFromImagePicker.SaveAsPngToPhotoLibrary(texScreenShot, this.name, "OnFinishedSaveImage"); }