1
NGUI 3 Support / Re: UIFont.CalculatePrintedSize alternatives
« on: January 23, 2014, 06:16:07 AM »
ArenMook, why doesn't this function depend on the particular font? Different fonts should produce different values, should not they?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
| Vector3 windowDimensions = NGUIMath.CalculateRelativeWidgetBounds(this.transform).size; Vector3 windowPosition = new Vector3(); windowPosition.x = -1 * windowDimensions.x / 2; windowPosition.y = windowDimensions.y / 2; this.transform.localPosition = windowPosition; |