2D Toolkit Forum
2D Toolkit => Support => Topic started by: TwistedSage on December 09, 2014, 10:07:59 am
-
Well. Header says it all. I need to split a sentence in words and have each word be "touchable".
I could do it in code, dynamically creating textmesh'es, but I was wondering if there is an easy way to do this?
Thanks in advance
Odin
-
No there isn't an easy way to do this. Having said that though, if you give each word a subtly different color (eg. 0xffffffff, 0xfeffffff, etc) then you can figure out which triangle you're touching, look at the vcolors and you'll know straight away which word you're touching. Or you could simply add some code to tell you where all the quads for the characters are...
-
I just split it up and added a TextMesh for each with a 2D box collider. That worked fine. But your suggestions are cool as well thanks :)