When I compile my game (on PC), it makes the Screenshot folder but it doesn’t save anything in it.
Here’s the code snippits:
var screenshotFolder = "Screenshots";
private var screenshotcount = 0;
if (Input.GetKey (KeyCode.F12))
{
Screenshot ();
}
function Screenshot() {
screenshotcount++;
var scrshot = String.Format("{0}/{1}screenshot.png", screenshotFolder, screenshotcount );
Application.CaptureScreenshot (scrshot);
yield WaitForSeconds(0.5);
}
function Start () {
if (System.IO.Directory.Exists(screenshotFolder)) {
} else {
System.IO.Directory.CreateDirectory(screenshotFolder);
}
}
When I launch it through Development Build, it says ‘Failed to Store Screenshot’.