using UnityEngine; public class ScreenShot : MonoBehaviour { private void Start() { } private void Update() { if (Input.GetKey(KeyCode.Y)) { ScreenCapture.CaptureScreenshot(Application.dataPath + "/MyscreenShot.png"); } } }