21 lines
469 B
C#
21 lines
469 B
C#
using System.IO;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace NEG.Editor
|
|
{
|
|
public static class ScreenshotMaker
|
|
{
|
|
[MenuItem("CONTEXT/Camera/Save view")]
|
|
public static void Capture(MenuCommand command)
|
|
{
|
|
string path = EditorUtility.SaveFilePanel("Save screenshot", "", "screen.png", "png");
|
|
if (path.Length == 0)
|
|
return;
|
|
|
|
ScreenCapture.CaptureScreenshot(path);
|
|
|
|
}
|
|
|
|
}
|
|
} |