protected override void OnInitialized() { base.OnInitialized(); Dialog_StepNode node = Model as Dialog_StepNode; textField.value = node.content; textField.RegisterValueChangedCallback((e) => { OnTextContentChange(e.newValue); }); }
private void OnTextContentChange(string newValue) { Dialog_StepNode node = Model as Dialog_StepNode; Owner.CommandDispacter.Do(new ChangeValueCommand(node.content, newValue, (str) => { node.content = str.ToString(); textField.value = node.content; }, (str) => { node.content = str.ToString(); textField.value = node.content; })); }