Hi!
I have some problem with UILabel.
If I want to change width of line UILablel like this:
child.transform.FindChild("Tween").transform.FindChild("Description").GetComponent<UILabel>().lineWidth = 640;
Debug.LogWarning("LineWidth = "+ child.transform.FindChild("Tween").transform.FindChild("Description").GetComponent<UILabel>().lineWidth);
But a width did not change on an interface:(
I'm commented two line in UILabel.cs.
UILabel.csprotected override void OnStart ()
{
if (mLineWidth > 0f)
{
// mMaxLineWidth = Mathf.RoundToInt(mLineWidth);
// mLineWidth = 0f;
}
if (!mMultiline)
{
mMaxLineCount = 1;
mMultiline = true;
}
// Whether this is a premultiplied alpha shader
mPremultiply = (font != null && font.material != null && font.material.shader.name.Contains("Premultiplied"));
}
And all works well!!!!.
What can a problem be in?