在这里插入图片描述

using UnityEditor;
using UnityEngine;


[InitializeOnLoad]
public static class MyAATest
{
    static MyAATest()
    {
    	//重点!!!
        Editor.finishedDefaultHeaderGUI += OnPostHeaderGUI;
    }

    static bool markable = false;
    static void OnPostHeaderGUI(Editor editor)
    {
        markable = GUILayout.Toggle(false, new GUIContent("MyAA", "tips"));


        if (!markable) return;
        EditorGUILayout.DropdownButton(new GUIContent("MyAA", "tips"), FocusType.Keyboard);
    }
}