I’m using a ScriptableObject to hold data for an editor database class that I’ve created and I have a Save function that sets the class and the asset dirty and then calls AssetDatabase.SaveAssets() and AssetDatabase.Refresh()
The class is private and I don’t want it to be visible in the inspector so I wasn’t using [SerializeField].
When I save and close out of Unity and open it back up, the data in the ScriptableObject did not save and the only way I’ve managed to get it to save across loading instances of the unity engine is by using [SerializeField] on the main list held by the database class.
Is there a way to keep it saved without having the data visible in the inspector?