UnityEditor 编辑器脚本执行菜单
例:执行 Edit/Duplicate 菜单
[MenuItem("Tools/Duplicate")]
private static void ExecuteDuplicate() {
bool isExecute = EditorApplication.ExecuteMenuItem("Edit/Duplicate");
Debug.Log(isExecute);
}
例:执行 Edit/Duplicate 菜单
[MenuItem("Tools/Duplicate")]
private static void ExecuteDuplicate() {
bool isExecute = EditorApplication.ExecuteMenuItem("Edit/Duplicate");
Debug.Log(isExecute);
}