/*
Author:		Jan Lygnos
Date:		12.8.2019
Last Edit:  13.8.2019
*/

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(AudioDatabase))]
public class AudioDatabaseEditor : Editor {

    private AudioDatabase audioDatabase;
    private SerializedObject audioDatabaseSerialized;
    private SerializedProperty registeredAudio;

    private void OnEnable() {
        audioDatabase = (AudioDatabase)target;
        audioDatabaseSerialized = new SerializedObject(audioDatabase);
    }

    public override void OnInspectorGUI() {
        audioDatabaseSerialized.Update();
        EditorGUILayout.Space();
        EditorGUILayout.HelpBox("This is the main Audio database.", MessageType.Info);
        EditorGUILayout.Space();
        DrawDefaultInspector();
        audioDatabaseSerialized.ApplyModifiedProperties();
        serializedObject.ApplyModifiedProperties();
    }
}