using UnityEditor;
using UnityEngine;

[InitializeOnLoad]
static class Fort23ProjectSetting
{
    [SettingsProvider]
    public static SettingsProvider SetNGUIDepthUI()
    {
        SettingsProvider settingsProvider = new SettingsProvider("Project/Fort23Setting", SettingsScope.Project)
        {
            label = "层级视图插件",
        };
        settingsProvider.guiHandler = GuiHandler;
        return settingsProvider;
    }

    private static void GuiHandler(string data)
    {
        bool isActivie = EditorPrefs.GetBool("isActiveObjectTool", false);
        isActivie = GUILayout.Toggle(isActivie, "开启层级视图插件显示");
        EditorPrefs.SetBool("isActiveObjectTool", isActivie);
    }
}