1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-21 01:36:03 +08:00

Node graphs now open in same window instead of a new one.

This commit is contained in:
Thor Brigsted 2017-12-29 12:12:54 +01:00
parent 18157226fa
commit 83b8a693e3

View File

@ -85,7 +85,8 @@ namespace XNodeEditor {
public static bool OnOpen(int instanceID, int line) {
XNode.NodeGraph nodeGraph = EditorUtility.InstanceIDToObject(instanceID) as XNode.NodeGraph;
if (nodeGraph != null) {
NodeEditorWindow w = Init();
NodeEditorWindow w = GetWindow(typeof(NodeEditorWindow), false, "xNode", true) as NodeEditorWindow;
w.wantsMouseMove = true;
w.graph = nodeGraph;
return true;
}