CaptureScreenshot to Texture

So I been working on something, and the thing I want is something that let the player can take a screenshot and then show that screenshot on to plane.

Can anyone tell me what I’m doing wrong.

I know this take the screenshot

Application.CaptureScreenshot("Screenshot.png");

I’m not really sure how to get this next part to work.

Application.persistentDataPath

I think you can use something like this to put the textures onto the plane, But not really sure.

tex.ReadPixels(new Rect(0,0,128,128),0,0);
tex.Apply();

display.material.mainTexture = tex;

Plz help.

Since CaptureScreenshot saves a .png file under Application.persistentDataPath you then need to load the png file to be able to use it as a Texture2D and finally set it as you material texture.
Check Unity - Scripting API: WWW.LoadImageIntoTexture for more info & example on the procedure :slight_smile: