IEnumerator LoadBagSlot(List <ItemInfo> items) { yield return(null); foreach (ItemInfo item in items) { if (item.Place < 31) { continue; } GameObject slotObj = GameObject.Find("BagSlot (" + (item.Place - 31).ToString() + ")"); if (slotObj == null) { continue; } BagSlotController slot = slotObj.GetComponent <BagSlotController>(); if (slot == null) { continue; } string equipType = getEquipType(item.Pic); Debug.Log(sexEquipString + equipType + "/" + item.Pic + "/icon_1"); slot.LoadDisplay(sexEquipString + equipType + "/" + item.Pic + "/icon_1"); } }
void loadToSlot(bool isMale, string slotPrefix, int place, ItemInfo item) { // Debug.Log(slotPrefix +" ("+place.ToString()+")"); GameObject gO = GameObject.Find(slotPrefix + " (" + place.ToString() + ")"); if (gO == null) { return; } BagSlotController slot = gO.GetComponent <BagSlotController>(); if (slot == null) { return; } Texture2D te = tryLoadEquipDisplay(isMale, item); // Debug.Log("Loading " + slotPrefix + " " + place + "-" + item.Pic +" : " +(te != null)); slot.LoadDisplay(te); }