Ejemplo n.º 1
0
    private IEnumerator WaitForDatabaseSearch()
    {
        CategoryListPanel.SetActive(false);
        for (int i = 0; i < 2; i++)
        {
            yield return(null);
        }
        List <Category> categories = DatabaseConnection.GetCategories();

        SpawnCategories(categories);
    }
Ejemplo n.º 2
0
 private void SpawnCategories(List <Category> categories)
 {
     NoCategoriesText.SetActive(false);
     if (categories.Count == 0)
     {
         NoCategoriesText.SetActive(true);
     }
     foreach (Category category in categories)
     {
         Admin_CategoryLineEdit newCategory = Instantiate(CategoryLinePrefab, CategoryParent, false).GetComponent <Admin_CategoryLineEdit>();
         newCategory.SetCategoryInfo(category);
         CategoryLineList.Add(newCategory);
         newCategory.gameObject.SetActive(true);
     }
     CategoryListPanel.SetActive(true);
 }