I’m trying to grab screenshots using the script below on the iphone. Application.captureScreenshot works faster than this code on the iphone but then I can’t control the capture area. Both are really slow on the iphone 4s like 1.5 frames per second. I’m wondering if there is any way to speed this up using any new features in the pro version?
import System;
import System.IO;
function UploadPNG () {
// Create a texture the size of the screen, RGB24 format
var width = Screen.width;
var height = Screen.height;
var tex = new Texture2D (width, height, TextureFormat.RGB24, false);
// Read screen contents into the texture
tex.ReadPixels (Rect(0, 0, width, height), 0, 0);
// Encode texture into PNG
var bytes = tex.EncodeToPNG();
Destroy (tex);
File.WriteAllBytes(Application.dataPath+"Documents/screenpng"+screencounter+".png", bytes);
}
}