Question by
Magnificent_7 · Nov 02, 2019 at 02:35 PM ·
scriptableobjectsave datapersistence
Scriptable Object lose its datas at unity relaunch when I parse it with an editor script
Good something to everybody,
I have some few Json I transform to Scriptable Object at editor time when there are import in Unity. This works (meaning my Scriptable Object is well parse with all the good values). But, if I am quitting Unity, my SO is empty !
I have notice that if I change, by the hand, my SO values, they are persistent. Is anybody knows why ?
Regards
Comment
Answer by Magnificent_7 · Nov 08, 2019 at 11:07 AM
Since I may have found the solution, I post it here : whenever I am doing a change on my SO, I use these to lines : EditorUtility.SetDirty(mySO); AssetDatabase.SaveAssets();