private void ResetItems() { CItemRender item; for (int i = 0; i < _allItem.Count; i++) { item = _allItem[i]; item.name = "Item" + i; CItemRender w = item; if (_dataCondition != null) { w.SetCondition(_dataCondition); } w.Data = _dataProvider[i]; float itemX, itemY; //一列一列的顺序? itemY = content.baseClipRegion.w / 2 + content.baseClipRegion.y + offY; itemX = i * itemWidth; item.tran.localPosition = new Vector3(itemX, itemY, 0); List <BoxCollider> boxList = DisplayUtil.GetComponentByType <BoxCollider>(item.go); for (int n = 0, len = boxList.Count; n < len; n++) { EventUtil.AddHover(boxList[n].gameObject, OnHover, item); } } }