- Home /
Capture a screenshot and use it as a GUITexture on iOS
Is it possible to capture a screenshot using Application.CaptureScreenshot() and use it as a GUITexture on iOS devices? I've been raking my brain with this for hours.
If Application.CaptureScreenshot() isn't the way to go, does anyone know what the best way to do this would be?
Answer by Bunny83 · Jun 25, 2012 at 10:55 AM
All you need is Texture2D.ReadPixels which reads a part or the full framebuffer into a texture. This should work even in the free version ;) Not sure about iOS, but it's a quite basic feature.
Another way would be to use Application.CaptureScreenshot, which saves the image as png on the device and then use the WWW class to read the file back in and finally use WWW.LoadImageIntoTexture to apply the image to a texture.
Answer by SolidSnake · Dec 06, 2011 at 01:23 PM
did you try render texture?
http://unity3d.com/support/documentation/Components/class-RenderTexture.html
I'm almost positive that RenderTexture isn't supported on iOS.
I tested it before with OpenGLES 2.0 which is supported since iPhone 3GS. It should be also supported with openGL es 1.1 too unless there is unity limitation. are you using Unity PRO?
Does this means there's a hardware restriction? Ie it wont work on ipod touch 2nd generation etc?
Your answer