您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
17 行
427 B
17 行
427 B
using UnityEditor;
|
|
using UnityEngine;
|
|
using System;
|
|
using System.IO;
|
|
|
|
public class ScreenshotTaker
|
|
{
|
|
//[MenuItem("Tools/Take Screenshot")]
|
|
public static void TakeScreenshot()
|
|
{
|
|
if (!Directory.Exists("Screenshots"))
|
|
Directory.CreateDirectory("Screenshots");
|
|
|
|
ScreenCapture.CaptureScreenshot(string.Format("Screenshots/{0}.png", DateTime.Now.ToString("yyyy-MM-dd HH.mm.ss")));
|
|
}
|
|
}
|
|
|