TextMesh.font Manual     Reference     Scripting  
Scripting > Runtime Classes > TextMesh
TextMesh.font

var font : Font

Description

The Font used.

See Also: text mesh component.

JavaScript
// Set the text of the attached Text mesh
var newFont : Font;
GetComponent(TextMesh).font = newFont;

using UnityEngine;
using System.Collections;

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

import UnityEngine
import System.Collections

class example(MonoBehaviour):

public newFont as Font

def Example():
GetComponent[of TextMesh]().font = newFont