When using the Unity UI Text component, is there a way to determine the number of lines of text, and the number of characters per line of text?
The Text.cachedTextGeneratorForLayout seems really promising - it returns a list of UILineInfo objects, which each tell you the start and end char index for the line.
However, the info I get from Text.cachedTextGeneratorForLayout is always 1 line...even if, visually, I can see that the text wraps to 3-4 lines. It seems like it only returns multiple...
Determine Text Line Count and Characters Per Line
The Text.cachedTextGeneratorForLayout seems really promising - it returns a list of UILineInfo objects, which each tell you the start and end char index for the line.
However, the info I get from Text.cachedTextGeneratorForLayout is always 1 line...even if, visually, I can see that the text wraps to 3-4 lines. It seems like it only returns multiple...
Determine Text Line Count and Characters Per Line