TextMesh.font 字体


var font : Font

Description描述

The Font used.

文本使用的字体。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public Font newFont;public void Awake() {GetComponent<TextMesh>().font = newFont;}}
// Set the text of the attached Text mesh//设置附加到文本网格的字体var newFont : Font;GetComponent(TextMesh).font = newFont;


,