Created
September 13, 2015 09:59
-
-
Save NegishiTakumi/56bd72abb2ec3e3de5f1 to your computer and use it in GitHub Desktop.
スクリーンショットをとるスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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