- Home /
iOS - Save Screenshot, Load as Texture?
Hello,
I want to be able to take a screenshot of the users display by using 'Application.CaptureScreenshot'. I then want to load that PNG in later as a texture.
First problem is saving it in the same directory when on Mac and iOS, which I guess I can use 'Application.persistentDataPath' to retrieve the correct path?
Next step is loading in the PNG, and applying it as a texture to an object. I've figured out the applying bit:
quad.renderer.material.SetTexture("_MainTex", snapshot);
I just don't know how to actually load in the image as a texture?
Any ideas? Thanks
Answer by unity_vjl · Oct 07, 2016 at 07:41 AM
Maybe this link can help you: http://stackoverflow.com/questions/16212343/ios-ipad-how-to-load-a-screenshot-created-at-runtime-into-a-texture-or-texture
See also this link: https://ralphbarbagallo.com/2012/04/09/3-ways-to-capture-a-screenshot-in-unity3d/
Your answer
![](https://koobas.hobune.stream/wayback/20220613130711im_/https://answers.unity.com/themes/thub/images/avi.jpg)