private void LoadEquipmentConfig() { string filePath = Path.Combine(UnityEngine.Application.streamingAssetsPath, equipmentFileName); if (File.Exists(filePath)) { // Read the json from the file into a string string dataAsJson = File.ReadAllText(filePath); // Pass the json to JsonUtility, and tell it to create a GameData object from it loadedData = UnityEngine.JsonUtility.FromJson <EquipmentConfig>(dataAsJson); } else { loadedData = EquipmentConfig.SampleData(); Debug.LogError("Cannot load game data!"); } }