void CreateDatabase() { db = CreateInstance <WordDatabase>(); AssetDatabase.CreateAsset(db, "Assets/" + WordDatabase.db_path); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); }
void LoadDatabase() { db = AssetDatabase.LoadAssetAtPath <WordDatabase>("Assets/" + WordDatabase.db_path); if (db == null) { CreateDatabase(); } }