- Home /
Character position in a TextMesh object
Hi guys,
Is it possible to know an exact position of any character in a TextMesh? Let's say we have a GameObject with a TextMesh component. It has a string like textMesh.text = "My string". I would like to know whether a mouse cursor/touch is over a certain character in that string. So for example, if I click/tap on a char "s" then I can get it in my class and display in the console with Debug.Log(clickedChar). The same for any char in the TextMesh. I hope that I am clear enough. The thing is that TextMesh.text is not static and can be totally anything anytime. Also wrapped, resized, moved, one line, multilines and so on. So in few words, is it possible to get a location of each char in a TextMesh?
Your answer
Follow this Question
Related Questions
Anchor TextMesh position to objects. 0 Answers
How can I find the position of my weapon? 1 Answer
Align TextMesh on Top Right 1 Answer
how to position the camera? pls help. 0 Answers
Screen to world point - parented camera 0 Answers