﻿using UnityEngine;
using UnityEditor;

#if UNITY_EDITOR
[CustomEditor(typeof(ObjectSpawner))]
public class ObjectSpawner_Editor : Editor {

    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        ObjectSpawner pSetup = (ObjectSpawner)target;
        if (GUILayout.Button("Preview objects"))
        {
            pSetup.SpawnObjects();
        }
        if (GUILayout.Button("Destroy objects"))
        {
            pSetup.DestroyObjects();
        }
    }
}
#endif