public void UndoableEnterableNodeTextField(SF_Node node, Rect r, ref string value, string undoMsg, bool update = true, UnityEngine.Object extra = null) { string nextValue = value; SF_GUI.EnterableTextField(node, r, ref nextValue, EditorStyles.textField, update); if (nextValue != value) { Undo.RecordObject(this, undoMsg); if (extra != null) { Undo.RecordObject(extra, undoMsg); } value = nextValue; } }