Created
November 7, 2014 18:29
-
-
Save sapphire-al2o3/10ba2a2cf3aaa1c8ca21 to your computer and use it in GitHub Desktop.
Unityでスクリーンショットを保存するエディタ拡張のスクリプト
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 UnityEngine; | |
using UnityEditor; | |
public class CaptureScreenshot : Editor | |
{ | |
[MenuItem("Editor/Capture...")] | |
public static void Capture() | |
{ | |
string path = EditorUtility.SaveFilePanel("Save Screenshot", Application.dataPath, "cap", "png"); | |
if (!string.IsNullOrEmpty(path)) | |
{ | |
Application.CaptureScreenshot(path); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment