Legacy Documentation: Version 5.4
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

TextMesh.font

Switch to Manual
public Font font;

Description

The Font used.

See Also: text mesh component.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Font newFont; void Example() { GetComponent<TextMesh>().font = newFont; } }