mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 09:16:01 +08:00
Small performance improvement. Nodes are now automatically marked dirty when changed.
This commit is contained in:
parent
a0d86c895e
commit
a71cf4961d
@ -364,12 +364,11 @@ namespace XNodeEditor {
|
||||
//Draw node contents
|
||||
nodeEditor.OnNodeGUI();
|
||||
|
||||
//Apply
|
||||
nodeEditor.serializedObject.ApplyModifiedProperties();
|
||||
|
||||
//If user changed a value, notify other scripts through onUpdateNode
|
||||
if (EditorGUI.EndChangeCheck()) {
|
||||
if (NodeEditor.onUpdateNode != null) NodeEditor.onUpdateNode(node);
|
||||
EditorUtility.SetDirty(node);
|
||||
nodeEditor.serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user