using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CaptureScreenshotC : MonoBehaviour {
private int count = 0;
void Update () {
if (Input.GetKeyDown(KeyCode.P))
{
OnJTButtonClick();
}
}
public void ScreenShotFile(string fileName) {
UnityEngine.ScreenCapture.CaptureScreenshot(fileName);
}
public void OnJTButtonClick() {
count++;
Debug.Log(Application.persistentDataPath + "/" + count + ".png");
ScreenShotFile(Application.persistentDataPath + "/"+count+".png");
}
}