finally resolved issue with saving ScriptableObjects in assets. Every instance of SO must me individually put there(once, though). Also, before saving the assets, the SetDirty must be called on the root of the hierarchy of SOs.