Example #1
0
 private void InitCategories()
 {
     _categories     = FV_edUtils.GetListFromEnum <FV_Items.Category>();
     _categoryLabels = new List <string>();
     foreach (FV_Items.Category category in _categories)
     {
         _categoryLabels.Add(category.ToString());
     }
 }
Example #2
0
        private void InitContent()
        {
            // Set the ScrollList
            _items = FV_edUtils.GetAssetsWithScript <FV_Items>(_path);

            _categorizedItems = new Dictionary <FV_Items.Category, List <FV_Items> >();
            _previews         = new Dictionary <FV_Items, Texture2D>();
            // Init the Dictionary
            foreach (FV_Items.Category category in _categories)
            {
                _categorizedItems.Add(category, new List <FV_Items>());
            }


            // Assign items to each category
            foreach (FV_Items item in _items)
            {
                _categorizedItems[item.category].Add(item);
            }

            GeneratePreviews();
        }