Skip to content

Instantly share code, notes, and snippets.

@NegishiTakumi
Created September 13, 2015 09:59
Show Gist options
  • Save NegishiTakumi/56bd72abb2ec3e3de5f1 to your computer and use it in GitHub Desktop.
Save NegishiTakumi/56bd72abb2ec3e3de5f1 to your computer and use it in GitHub Desktop.
スクリーンショットをとるスクリプト
using System;
using UnityEngine;
using System.Collections;
public class ScreenShotManager : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown(KeyCode.RightShift))
{
ScreenShotxN(2);
}
if (Input.GetKeyDown(KeyCode.Space))
{
ScreenShotxN(4);
}
}
private void ScreenShotxN(int magnification)
{
Application.CaptureScreenshot("SS" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".png", magnification);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment