エディタの実行中の画面のスクリーンショットをとって保存するスクリプトを書いた。
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); | |
} | |
} | |
} |
Editorディレクトリに置くと、メニューにEditor – Captureが出てくるのでスクリーンショットを保存したいタイミングでクリックする。
これで開発中の画面をすぐに保存できる。
コメントを残す