mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +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
|
//Draw node contents
|
||||||
nodeEditor.OnNodeGUI();
|
nodeEditor.OnNodeGUI();
|
||||||
|
|
||||||
//Apply
|
|
||||||
nodeEditor.serializedObject.ApplyModifiedProperties();
|
|
||||||
|
|
||||||
//If user changed a value, notify other scripts through onUpdateNode
|
//If user changed a value, notify other scripts through onUpdateNode
|
||||||
if (EditorGUI.EndChangeCheck()) {
|
if (EditorGUI.EndChangeCheck()) {
|
||||||
if (NodeEditor.onUpdateNode != null) NodeEditor.onUpdateNode(node);
|
if (NodeEditor.onUpdateNode != null) NodeEditor.onUpdateNode(node);
|
||||||
|
EditorUtility.SetDirty(node);
|
||||||
|
nodeEditor.serializedObject.ApplyModifiedProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
GUILayout.EndVertical();
|
GUILayout.EndVertical();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user