iOS - Save Screenshot, Load as Texture?


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

Maybe this link can help you: unity game engine - IOS (IPad) How to load a screenshot created at runtime into a Texture or Texture2D - Stack Overflow

See also this link: Ralph Barbagallo - VR, AR, XR, Game Developer and Publisher