Hi everyone,
I need to display a text in an UI Label. This text is dynamic (change during the game) and may contain '\n' characters.
The label has a maximum number of lines and I want to resize it on its width, not its height. I didn't find a way to do that using the parameters in the UILabel component so I decided to implement it myself.
For that, I use UILabel.Wrap(string, out string, int) method. The method returns true if the text given fits in the label, false otherwise.
But when my text contains a '\n' character, it returns true, even if the text does not fit.
I think the problem comes from the line : if (lineCount == maxLineCount) break;
The version of NGUI is 3.5.7.
I didn't find a bug tracker so I posted this here.