This is a working script for Cature a screenshot and save it in file
after that i create a GUITexture and put the Texture to None(Texture)
when i screenshot and save,i wanted it to display it on GUITexture>can some1 help me thx i have no idea how to write it
using UnityEngine;
using System.Collections;
public class TakeScreenshot : MonoBehaviour
{
private int screenshotCount = 0;
// Check for screenshot key each frame
void Update()
{
// take screenshot on up->down transition of F9 key
if (Input.GetKeyDown("k"))
{
string screenshotFilename;
do
{
screenshotCount++;
screenshotFilename = "screenshot" + screenshotCount + ".png";
} while (System.IO.File.Exists(screenshotFilename));
Application.CaptureScreenshot(screenshotFilename);
}
}
}