public IEnumerator LoadCategories(JSONNode categories) { ClearCatregories(); for (int i = 0; i < categories.Count; i++) { CategoriesHolder instantiatedCategory = null; yield return(new WaitUntil(() => InstantiateCategories(out instantiatedCategory))); instantiatedCategory.AssignData(categories[i]); instantiatedCategory.CategorySelected = CategorySelected; _instantiatedCategories.Add(instantiatedCategory); } _isLoaded = true; }
private bool InstantiateCategories(out CategoriesHolder categories) { categories = Instantiate(_categoriesPrefab, _categoriesHolder); return(true); }
public override void Load() { Categories = CategoriesHolder.Load(FilePath); }