protected override void BindingProperties() { base.BindingProperties(); rawTitle = T_Model.Title; nameField.SetValueWithoutNotify(T_Model.Name); costField.SetValueWithoutNotify(T_Model.Cost); Model.Title = T_Model.Name + $"({rawTitle})"; nameField.RegisterValueChangedCallback(evt => { T_Model.Name = evt.newValue; }); costField.RegisterValueChangedCallback(evt => { T_Model.Cost = evt.newValue; }); btnAddCondition.clicked += () => { T_Model.AddPrecondition(new GOAPState()); Owner.SetDirty(); }; btnAddEffect.clicked += () => { T_Model.AddEffect(new GOAPState()); Owner.SetDirty(); }; T_Model.BindingProperty <string>(nameof(T_Model.Name), OnNameChanged); T_Model.BindingProperty <float>(nameof(T_Model.Cost), OnCostChanged); T_Model.onPreconditionAdded += OnPreconditionAdded; T_Model.onPreconditionRemoved += OnPreconditionRemoved; T_Model.onEffectAdded += OnEffectAdded; T_Model.onEffectRemoved += OnEffectRemoved; }