15
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

uGuiでText内の文字色・サイズを文字単位で変更する

Last updated at Posted at 2016-06-18

1.Textスクリプトをつける
2.RichTextのチェックボックスをつける。
3.HTMLのcolorタグ・sizeタグを使用(タグはあんまりわかってないけど使えます)

 黒:#000000
 赤:#ff0000

■abcは赤、deは黒、fgは緑

public Text ButtonText;

public void OnTextChange()
{
    ButtonText.text = "<size=30><color=#ff0000>abc</color>de<color=#00ff00>fg</color></size>";
}
15
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?