kingBook

导航

UnityEditor 编辑器脚本执行菜单

例:执行 Edit/Duplicate 菜单

[MenuItem("Tools/Duplicate")]
private static void ExecuteDuplicate() {
    bool isExecute = EditorApplication.ExecuteMenuItem("Edit/Duplicate");
    Debug.Log(isExecute);
}

posted on 2022-06-19 18:09  kingBook  阅读(124)  评论(0编辑  收藏  举报