mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 09:16:01 +08:00
Null check
This commit is contained in:
parent
0150a7bb81
commit
b48f7d63b4
@ -16,6 +16,7 @@ public class NodeEditorGUILayout {
|
||||
else EditorGUILayout.LabelField(label);
|
||||
|
||||
Rect rect = GUILayoutUtility.GetLastRect();
|
||||
if (port == null) { portPosition = rect.position; return null; }
|
||||
if (port.direction == NodePort.IO.Input) rect.position = rect.position - new Vector2(16, 0);
|
||||
if (port.direction == NodePort.IO.Output) rect.position = rect.position + new Vector2(rect.width, 0);
|
||||
rect.size = new Vector2(16, 16);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user