Application.CaptureScreenshot

Has anyone had any luck using Application.CaptureScreenshot on iPhone?

Im using 1.5.1 (compiling for 2.2.1) and can't seem to get it to work (doesn't crash, just doesn't do anything)

thanks

Chris

This does work. It will save the screenshot to <`Application.dataPath`>..\Documents. You can access the file through Xcode with this method.

Application.CaptureScreenshot

If the file exists already, it will be overwritten. This function does nothing if used from inside the web player or a Dashboard widget.

Perhaps the same is true for iPhone applications. Though I am not an iPhone application developer, you'll probably want this verified from other sources.

sorry to bump this but it would be really good to hear from someone who knows for def. the answer to this, thanks in advance.

Chris

var tex = new Texture2D( Screen.width, Screen.height, TextureFormat.RGB24, false );
tex.ReadPixels( new Rect( 0, 0, Screen.width, Screen.height ), 0, 0, false );
var bytes = tex.EncodeToPNG();
Use “bytes” to post or upload
cheers