// Loads the items from json private ItemDatabaseList LoadItemsFromFile() { string _filePath = Path.Combine(Application.streamingAssetsPath, itemDataFileName); if (File.Exists(_filePath)) { string dataAsJson = File.ReadAllText(_filePath); ItemDatabaseList databaseList = JsonUtility.FromJson <ItemDatabaseList>(dataAsJson); return(databaseList); } return(null); }
private void Start() { itemDatabaseList = GameObject.Find("ItemDatabaseList").GetComponent <ItemDatabaseList>(); }