Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: gk on November 19, 2014, 10:49:50 PM

Title: getting number of character that can fit in a label
Post by: gk on November 19, 2014, 10:49:50 PM
Is there any way i get the number of characters that can be fit in label.
Title: Re: getting number of character that can fit in a label
Post by: ArenMook on November 20, 2014, 06:33:03 PM
NGUIText.CalculatePrintedSize or NGUIText.WrapText. Nothing will tell you the number of characters, but WrapText will return all lines split by \n, so you can just do string.IndexOf('\n').