Merged in Ziboo/unity-ui-extensions-1/Ziboo/change-how-children-are-resize-using-rec-1443606808122 (pull request #10)

Change how children are resize.

--HG--
branch : develop_5.2
release
Simon Jackson 2015-09-30 18:24:26 +01:00
commit bbe89b55d5
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ namespace UnityEngine.UI.Extensions
RectTransform child = _screensContainer.transform.GetChild(i).gameObject.GetComponent<RectTransform>();
currentXPosition = _offset + i * _step;
child.anchoredPosition = new Vector2(currentXPosition, 0f);
child.sizeDelta = new Vector2(gameObject.GetComponent<RectTransform>().sizeDelta.x, gameObject.GetComponent<RectTransform>().sizeDelta.y);
child.sizeDelta = new Vector2(gameObject.GetComponent<RectTransform>().rect.width, gameObject.GetComponent<RectTransform>().rect.height);
}
_dimension = currentXPosition + _offset * -1;