How to click on certain key words in text view in Unity?
I am making a cellphone game by Unity. Now I want to display several lines of description in Text view, and players can click on certain words in this text.
By example: the text is "This is a beautiful day", and the "day" is the key word, player can click on "day" to trigger another event.
I don't know how to do it. Does anyone have any idea or give me some hints? Thanks a lot!
Answer by $$anonymous$$ · Aug 26, 2017 at 02:24 AM
I did a lot search on internet but I did not find the solution which I want. Now, I am thinking two ways. One is to find the key word position(in my example, the position of "day"), then compare this position with the touch position(player touches the screen), if overlap, trigger function. But I don't know how to find the key word position. Another way is to use TextMesh Pro. It might work, but I don't know exact way yet.
Your answer
Follow this Question
Related Questions
Move camera between canvases in UI menu 0 Answers
How can I change the UI button color when clicked 1 Answer
How do I catch a click on a non-interactable button? 1 Answer
Help with button Text and error 1 Answer
Button OnTouch 1 Answer