Last active
June 28, 2016 02:42
-
-
Save HassakuTb/f46a8d65f98dd65f7e718f0fabddf8f6 to your computer and use it in GitHub Desktop.
Screenshot extension for Unity Editor
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
/** | |
Screenshot.cs | |
Copyright (c) 2016 Hassaku | |
This software is released under the MIT License. | |
http://opensource.org/licenses/mit-license.php | |
*/ | |
using UnityEngine; | |
using UnityEditor; | |
public class Screenshot : EditorWindow{ | |
[MenuItem ("Extension/Screenshot")] | |
public static void Capture() { | |
if (!EditorApplication.isPlaying) return; | |
string filename = System.DateTime.Now.ToString("yyyy-MM-dd_hh-mm-ss") + ".png"; | |
Application.CaptureScreenshot(filename); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment