public void OnClickBtnFromFile() { string tJsonStageInfoList = LoadResourceTextfile("stage_info_json"); CStageInfoList tInfoList = JsonUtility.FromJson <CStageInfoList>(tJsonStageInfoList); Debug.Log("stage_info count : " + tInfoList.stage_info.Count.ToString()); foreach (var tElement in tInfoList.stage_info) { Debug.Log("stage_info.id: " + tElement.id); Debug.Log("stage_info.total_enemy_count: " + tElement.total_enemy_count); foreach (var tElement_0 in tElement.unit_info) { Debug.Log("unity_info.x: " + tElement_0.x); Debug.Log("unity_info.y: " + tElement_0.y); } } mpTxtString.text = tJsonStageInfoList; }
private void Start() { mStageInfoBundle = new CStageInfoList(); }
private void CreateWithStageData() { mStageInfoBundle = new CStageInfoList(); LoadStageXmlFile("XML/Enemy_info"); }