言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

TextMesh.richText

Switch to Manual
public var richText: bool;

Description

テキストフォーマットマークアップでHTML-styleタグが使用可能になる。

サポートするタグは:
<color="htmlcolor">colored text</color>、 "htmlcolor"はhtmlカラー文字列で、"#ff0000" や "red" のようなものです。 <b>bold text</b>
<i>italic text</i>
<size=20>sized text</size>
<material=1>render using custom material index</material>
<quad material=1 size=20 x=0.1 y=0.1 width=0.5 height=0.5>、 与えられたマテリアルとUVを使用してquad一つをレンダーします。テキスト内に埋め込まれた画像に使用されます。 これらはフォントをダイナミックフォントレンダリングに設定したときのみサポートされます。ただし'color'、'material' そして 'quad'タグは除きます。 Unityのリッチテキストは全htmlを実装していません。他のタグはサポート対象外です。

	GetComponent(TextMesh).richText = true;