The material assigned to this text object. Assigning a material will result in an instance of the material.
using UnityEngine; using System.Collections; using TMPro; public class ExampleClass : MonoBehaviour { void Awake() { TextMeshPro textmeshPro = GetComponent<TextMeshPro>(); textmeshPro.font = Resources.Load("ARIAL SDF", typeof(TMP_FontAsset)) as TMP_FontAsset; textmeshPro.fontMaterial = Resources.Load("ARIAL SDF Metal", typeof(Material)) as Material; } }