I'm trying to create some screenshots but ScreenCapture.CaptureScreenshot
actually captures the entire editor and not just the Game view.
I'm using this few lines of code here:
public class ScreenShotTaker : MonoBehaviour
{
public KeyCode takeScreenshotKey = KeyCode.S;
public int screenshotCount = 0;
private void Update()
{
if (Input.GetKeyDown(takeScreenshotKey))
{
ScreenCapture.CaptureScreenshot("Screenshots/"
+ "_" + screenshotCount + "_"+ Screen.width + "X" + Screen.height + "" + ".png");
Debug.Log("Screenshot taken.");
}
}
}
What could be the issue?
No comments:
Post a Comment