Check out example codes for "unity custom editor save changes". It will help you in understanding the concepts better.

Code Example 1

EditorUtility.SetDirty(castedTarget);

Learn ReactJs, React Native from akashmittal.com