- Home /
change/scale child rectTransform with Parent (with video)
simple I need to chold images/text (on a card) to keep the relative position and increase in size with the parent when I change it's rect transform
this is happing when the mouse scrolls over it and I need the card to enlarge/zoom
oldSize = GetComponent<RectTransform>().sizeDelta;
GetComponent<RectTransform>().sizeDelta = oldSize * 2;
oldChildSize = GetComponentInChildren<RectTransform>().sizeDelta;
GetComponentInChildren<RectTransform>().sizeDelta = oldChildSize * 2;
Comment