void LoadItem(string path) { IniFile ini = new IniFile(); if (!ini.Load_File(path)) { Debug.LogError("File " + path + " NOT exists!"); } foreach(string s in ini.Get_All_Section()) { ini.Goto_Section(s); ItemBase item = new ItemBase(); item.item_id = s; item.displayName = ini.Get_String("displayName","unnamed"); string tPath = ini.Get_String("icon",""); if (tPath != "") { Texture t = Resources.Load<Texture>(tPath); item.icon = t; } tPath = ini.Get_String("att1",""); if (tPath != "") { Texture t = Resources.Load<Texture>(tPath); item.att1 = t; } item.sell = ini.Get_Int("sell",0); item.buy = ini.Get_Int("but",0); item.weight = ini.Get_Float("weight",0f); item.comment = ini.Get_String("comment",""); database.Add(s,item); } }