Editor中可以自定义的位置


#if UNITY_EDITOR
 
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
 
public class Custom : MonoBehaviour
{
    [MenuItem("Custom/Custom Menu")]
    public static void CustomMenu()
    {
 
    }
 
    [MenuItem("GameObject/Custom/Custom GameObject Action")]
    public static void CustomGameObjectAction()
    {
        // Get Selected GameObject
    }
 
    [MenuItem("Assets/Custom/Custom Assets Action")]
    public static void CustomAssetsAction()
    {
        // Get Selected Asset
    }
 
    [ContextMenu("Custom Context Menu")]
    public void CustomContextMenu()
    {
 
    }
}
 
[CustomEditor(typeof(Custom))]
public class CustomInspector : Editor
{
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        GUILayout.Label("Custom Inspector");
    }
}
 
[CreateAssetMenu(fileName = "CustomAsset", menuName = "Custom/Custom Asset")]
public class CustomAsset : ScriptableObject
{
 
}
 
#endif