1
0
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:
Thor Brigsted 2018-06-24 17:43:07 +02:00
parent a0d86c895e
commit a71cf4961d

View File

@ -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();