unity3d(3)扩展编辑器

3.1.1扩展右键菜单

#3-1
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;


public class script_03_01 
{
    [MenuItem("Assets/My Tools/Xjw 1", false, 2)]
    static void MyTools1()
    {
        Debug.Log(Selection.activeObject.name);
    }

    [MenuItem("Assets/My Tools/Xjw 2", false, 1)]
    static void MyTools2()
    {
        Debug.Log(Selection.activeObject.name);
    }

}

你可能感兴趣的:(编辑器,unity,游戏引擎)