projectEli/Assets/Inventory System/Scripts/Editor/PhotoshootEditor.cs

45 lines
910 B
C#
Raw Normal View History

2023-01-25 07:14:16 +00:00
#if (UNITY_EDITOR)
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(Photoshoot))]
public class PhotoshootEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
Photoshoot photoshoot = (Photoshoot)target;
if (String.IsNullOrWhiteSpace(photoshoot.OutputPath))
{
Debug.LogError("Output Path should not be empty");
}
if (photoshoot.items == null)
{
Debug.LogError("Items should not be null and must contain child Game Objects.");
}
/*if (GUILayout.Button("Say Cheese 📸"))
{
photoshoot.ProcessScreenshots();
}*/
if (GUILayout.Button("Say Cheese! 📸"))
{
photoshoot.ProcessScreenshotsFaster();
}
}
}
2023-01-25 07:14:16 +00:00
#endif
/**/