using MiniJSON; using System.Collections; using System.Collections.Generic; using UnityEngine; public class table_fairy : table_itemdatabase { public static table_fairy Ins; public TextAsset m_json; private void Awake() { Ins = this; Dictionary jsonData = Json.Deserialize(m_json.text) as Dictionary; // ["items"]은 items.txt 안의 items를 가리킨다. 툴 우측 하단 파일 종류란에서 설정 가능. List obj = jsonData[GetType().Name] as List; foreach (object objt in obj) { Dictionary json = objt as Dictionary; var temp = Read(eItem.Fairy, json); temp.Prefab = json["Prefab"].ToString(); temp.Scale = float.Parse(json["Scale"].ToString()); temp.UIScale = float.Parse(json["UIScale"].ToString()); list_Data.Add(temp); } } }