Consider a Text
with many paragraphs of text. It's easy to find where a certain character is, using UICharInfo.
Example, find all newlines...
TextGenerator tg = text.cachedTextGenerator;
int kText = tg.characterCount;
for (int i=0; i < kText; ++i)
{
if ( text.text[i] == '\n' )
Debug.Log("found a newline at " + tg.verts[i * 4].position.y);
}
This gives the correct ratios but they are all out by some scaling factor.
It seems to depend on many things (screen shape, pixels, settings and more).
Naturally this is in a Canvas
using scale-with-screen-size.
How do you get the actual offset of a character - to use in a scroll view to scroll to that point?