Why is scriptable objects .asset file empty on Unity relaunch?

I have a Scriptable Object class that stores a list of Grid objects:

using System.Collections;
using System.Collections.Generic;

[System.Serializable]
public class SpawnableGrids : ScriptableObject {
	public List<LevelData.Grid> Grids;

	void OnEnable() {
		if (Grids == null) {
			Grids = new List<LevelData.Grid>();
		}
	}
}

The LevelData.Grid class is as follows:

[Serializable]
	// nested class to hold per grid information
	public class Grid {
		public int row;
		public int column;

		public Grid() {
			row = column = 0;
		}

		public Grid(int row, int column) {
			this.row = row;
			this.column = column;
		}
	}

The class to create the asset looks like this:

using UnityEngine;
using System.Collections;
using UnityEditor;

public class CreateSpawnableGrids {

	[MenuItem("Assets/Create/Greedy Assets/Spawnable Grids")]
	public static void CreateAsset() {
		SpawnableGrids grids = ScriptableObject.CreateInstance<SpawnableGrids>();
		AssetDatabase.CreateAsset(grids, "Assets/NewSpawnableGrids.asset");
		AssetDatabase.SaveAssets();
		AssetDatabase.Refresh ();
		EditorUtility.FocusProjectWindow();

		Selection.activeObject = grids;
	}
}

Now I have an editor functionality that i use to fill the list of grids in the Scriptable object asset I create in the scene. Everything works fine and the list persists the data between edit and play mode. But when i quit unity and relaunch it, the data in the list is gone. I have read online posts and blogs and I am not sure why my data is not persisting between unity sessions. Please let me know if you all find something wrong with my code. I am new to Scriptable objects and unity in general.

Thanks in advance!

This most likely due to adding the Grids after creating the ScriptableObject as an asset. When you change/modify content of an Asset in Unity through editor code you need to tell unity that you have changed it so Unity will save it. You do that by using the function EditorUtility.SetDirty with the object you want to save. So after adding the grid objects call the SetDirty function:

EditorUtility.SetDirty(spawnableGridsObject);