| | |
| | | var go = Instantiate(cellPrefab.gameObject); |
| | | cellView = go.GetComponent<EnhancedScrollerCellView>(); |
| | | cellView.transform.SetParent(_container); |
| | | |
| | | RectTransform rt = go.GetComponent<RectTransform>(); |
| | | rt.anchoredPosition3D = new Vector3(rt.anchoredPosition3D.x, rt.anchoredPosition3D.y, 0); |
| | | rt.localEulerAngles = Vector3.zero; |
| | | } |
| | | |
| | | return cellView; |
| | |
| | | else |
| | | go.AddComponent<HorizontalLayoutGroup>(); |
| | | _container = go.GetComponent<RectTransform>(); |
| | | _container.localEulerAngles = Vector3.zero; |
| | | |
| | | // set the containers anchor and pivot |
| | | if (scrollDirection == ScrollDirectionEnum.Vertical) |