public void AddContent(ScrollContentView prefab, ScrollContentInfo contentInfo) { var scrollContent = new ScrollContent(prefab, contentInfo); scrollContents.Add(scrollContent); Sync(); }
public void Activate(ScrollContentView instance) { referenceInstance = instance; referenceInstance.transform.localPosition = new Vector3(rect.x, -rect.y); referenceInstance.Activate(contentInfo); referenceInstance.gameObject.SetActive(true); }
public ScrollContent(ScrollContentView prefab, ScrollContentInfo contentInfo) { this.prefab = prefab; this.contentInfo = contentInfo; prefabRectTransform = (RectTransform)prefab.transform; }
public void Deactivate() { referenceInstance.Deactivate(contentInfo); referenceInstance.gameObject.SetActive(false); referenceInstance = null; }