
the orange color box is the size of label, the text of label are assigned during run time. but the collider (green box) are not match with the size of label.
i have tried to:
1. tick the "auto adjust collider" option under the widget of label.
2. called NGUItools.UpdateWidgetCollider(), pass in the collider of label, after i assign the text of label.
3. called GetComponent<UILabel>().ResizeCollider(), after i assign the text of label.
4. called NGUItools.CalculateRelativeWidgetBounds, calculate the value and manually assign to the size of the collider.
after i tired all above method, the collider still same like what the picture shown. please help