using System.Collections; using System.Collections.Generic; using UnityEngine; public class InventoryManager : MonoBehaviour { //allItems array public Item[] allItems; //Item list private List itemList; public List ItemList{ get{ return itemList; } set{ itemList = value; } } //Item Dictionary private Dictionary itemDict = new Dictionary(); public Dictionary ItemDict{ get{ return itemDict; } } void Awake(){ //Gets Items in Resource Folder allItems = Resources.LoadAll("ItemObjects"); itemList = new List(allItems); foreach(Item item in itemList){ itemDict.Add(item.name, item); } } }