반응형
- 코드 작성
using UnityEngine;
using System.Collections;
using System.IO;
public class ScreenCapture : MonoBehaviour
{
public string fileName = "screenshot.png";
void Update()
{
if (Input.GetKeyDown(KeyCode.C))
{
string filePath = Path.Combine(Application.dataPath, fileName);
ScreenCapture.CaptureScreenshot(filePath);
Debug.Log("Screenshot saved to: " + filePath);
}
}
}
반응형