mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
!W 一个关闭所有Node Editor Window窗口的菜单项
This commit is contained in:
parent
2b21b0ddc6
commit
0893d3b310
@ -8,6 +8,18 @@ using Object = UnityEngine.Object;
|
|||||||
namespace XNodeEditor {
|
namespace XNodeEditor {
|
||||||
[InitializeOnLoad]
|
[InitializeOnLoad]
|
||||||
public partial class NodeEditorWindow : EditorWindow {
|
public partial class NodeEditorWindow : EditorWindow {
|
||||||
|
|
||||||
|
[MenuItem("Icarus/Node Editor/Close All Editor Window")]
|
||||||
|
static void CloseAllNodeEditorWindow()
|
||||||
|
{
|
||||||
|
var windows = Resources.FindObjectsOfTypeAll<NodeEditorWindow>();
|
||||||
|
|
||||||
|
foreach (var window in windows)
|
||||||
|
{
|
||||||
|
window.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static NodeEditorWindow current;
|
public static NodeEditorWindow current;
|
||||||
|
|
||||||
/// <summary> Stores node positions for all nodePorts. </summary>
|
/// <summary> Stores node positions for all nodePorts. </summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user