2D Toolkit Forum
2D Toolkit => Support => Topic started by: quangtu89 on December 18, 2014, 11:04:40 am
-
Can change color for a part of text of tk2dtextmesh ? Can anyone help you .
Like this : " this is sample "
-
On the text mesh, turn on InlineStyling, click "?" for help on the syntax.
Eg. This is ^cf00fsample
Will highlight the word "sample" in red.
-
Hi and sorry for replying to an old topic (maybe you prefer user start a new topic?) but my problem fits totally with this post.
I want to make a text for a dialog and i want the character name appearing in a different color.
I follow what you re saying in this topic but my text stay in white color.
In my code i put this line :
window_text.GetComponent<tk2dTextMesh>().text = " ^cf00fsample ";
But that doesn't work for me.
Note that my font is a personnal font i ve created following your tuto on the site. And my textmesh is set as 'formating';
Have you an idea about what i've miss to make it work ?
(thx in advance and sry for my bad english)
-
Try entering it in the inspector, and then try it with one of the built in tk2d fonts. This should work (and does work on the latest released version) - must be missing something somewhere.
-
Thx for your answer. That didn't work because i've not created my font in 32 bits. Now with a new created font it works :)