21 lines
399 B
C#
21 lines
399 B
C#
|
using UnityEditor;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
#if UNITY_EDITOR
|
|||
|
|
|||
|
[CustomEditor(typeof(ScreenshotMaker))]
|
|||
|
public class ScreenshotSettingsWindow : Editor
|
|||
|
{
|
|||
|
public override void OnInspectorGUI()
|
|||
|
{
|
|||
|
DrawDefaultInspector();
|
|||
|
|
|||
|
var myScript = (ScreenshotMaker)target;
|
|||
|
if (GUILayout.Button("Take the shot"))
|
|||
|
{
|
|||
|
myScript.TakeScreenshot();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endif
|