﻿using UnityEditor;

namespace BansheeGz.BGDatabase.Editor
{
    [InitializeOnLoad]
    public class BGPlaymakerResetValuesInitializer
    {
        static BGPlaymakerResetValuesInitializer()
        {
            EditorApplication.playModeStateChanged -= StateChange;
            EditorApplication.playModeStateChanged += StateChange;
        }

        private static void StateChange(PlayModeStateChange state) => BGPlaymakerResetValuesA.ResetInstance();
    }
}