1
NGUI 3 Support / Re: How to get the dimensions of UIWidget
« on: January 07, 2014, 03:13:26 AM »Size... what do you mean by size (pixels or scale)?
If your "container" is a UIWidget, you can just call the container and look for height and width property:
Script on container:
float height = this.GetComponent<UIWidget>().height; float width = this.GetComponent<UIWidget>().width;
However, the widget is not going to change it's dimensions because you created a sprite as it's child.
If your "container" is just an empty GameObject then there is no size except scale, which is found by looking in the property this.transform.scale
Thanks!!!You are so nice!
