Version: 2017.1
public FontStyle fontStyle ;

描述

要使用的字体样式(用于动态字体)。

如果将该属性设置为 normal 以外的值,则使用自定义样式重写字体导入器中设置的字体样式。 仅支持设置为使用动态字体渲染的字体。其他字体将始终以正常样式呈现。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { GetComponent<TextMesh>().fontStyle = FontStyle.Bold; } }