private void AddEditorItem(PromoPicInfo promoPicInfo, bool lazyLoad) { PromoPicItem entity = this.promoItemsPool.GetEntity <PromoPicItem>(base.transform); ((RectTransform)entity.transform).anchoredPosition = Vector2.zero; entity.Init(promoPicInfo, lazyLoad); this.item = entity; }
private void AddEditorItem(PromoPicInfo promoPicInfo) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.promoPicPrefab); PromoPicItem component = gameObject.GetComponent <PromoPicItem>(); component.Init(promoPicInfo, false); this.items.Add(component); this.AddItemToScroll(component); }