添加自定义菜单项
[MenuItem("test/item1 %g")] public static void haha() { Debug.Log("this is a test"); } //添加带快捷键的菜单:只需要在后边添加%+key。 //(win : Ctrl+key, Mac :Cmd + key)
以上快捷键为:ctrl+G
添加组件菜单:
[AddComponentMenu("b2Components/b2Body",3)]
public class b2Body:MonoBehaviour {}
--