diff --git a/Source/Editor/CustomEditors/CustomEditor.cs b/Source/Editor/CustomEditors/CustomEditor.cs index c5c628755..ca45652b9 100644 --- a/Source/Editor/CustomEditors/CustomEditor.cs +++ b/Source/Editor/CustomEditors/CustomEditor.cs @@ -250,6 +250,15 @@ namespace FlaxEditor.CustomEditors _children[i].RefreshInternal(); } + /// + /// Synchronizes the value of the container. Called during Refresh to flush property after editing it in UI. + /// + /// The value to set. + protected virtual void SynchronizeValue(object value) + { + _values.Set(_parent.Values, value); + } + internal virtual void RefreshInternal() { if (_values == null) @@ -264,7 +273,7 @@ namespace FlaxEditor.CustomEditors _valueToSet = null; // Assign value - _values.Set(_parent.Values, val); + SynchronizeValue(val); // Propagate values up (eg. when member of structure gets modified, also structure should be updated as a part of the other object) var obj = _parent;