Data loss after closing Unity Editor

I’ve created a custom editor to edit my level data, which is saved as ScriptableObject.
It worked fine until recently, I noticed that after editing level data, every change I made will be lost after closing Unity.
Yes, entering play mode will NOT lose data but closing Unity Editor will.
What confuse me more is that if I create a new ScriptableObject and edit it, or rename one after editing, data will be saved.
Is this a bug with Unity 5.1, or did I do anything wrong using ScriptableObject?

Are you saving the changes you’re making to the ScriptableObject?
Depending on how you edit the object by code, you will need to explicitly make it save its changes.

ya it sounds like Unity might not know that it needs to be saved and so not telling you to save before it willingly closes. If you force it to save it might work?

Here are relevant functions:
EditorUtility.SetDirty
AssetDatabase.SaveAssets

It works, thanks~
It seems that I never tried to edit that for a second time…