So I have a little question I'm creating scriptable objects first time from spreadsheet data
trying to use the database to automagically make them...
for (int m = 0; m < myAssets.Count; m++)
{
Drill_WordBase newWordAsset = ScriptableObject.CreateInstance<Drill_WordBase>();
// overwrite the defaults with the json data
newWordAsset.word = word;
newWordAsset.isTrue = false;
myList.Add(newWordAsset);
AssetDatabase.CreateAsset(newWordAsset, "Assets/DrillWords/" + newWordAsset.name);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
EditorUtility.FocusProjectWindow();
Selection.activeObject = newWordAsset;
}
it "partly works" however I don't understand how to get it to save the files properly. Since in the Assets/Drill_Words/ folder there is some kind of file there but not a scriptable object with all of the info (see pic) However, the DrillWords list has scriptable objects, I haven't yet tested if they have all the data, I lose these scriptable objects after stopping playing?
Any idea what I am doing wrong, how to I save them?
With thanks - N