TextMeshPro.SetCharArray

void SetCharArray (char[] array);

Description

Array of characters which contains the text to be displayed.

Note: You may wish to use this function instead of TextMeshPro.text if you are already using character arrays instead of strings and trying to avoid unnecessary garbage collection.


using UnityEngine;
using System.Collections;
using TMPro;

public class ExampleClass : MonoBehaviour
{
    void Example()
    {
        TextMeshPro textmeshPro = GetComponent<TextMeshPro>();
        textmeshPro.SetCharArray(new char[] {'E', 'x', 'a', 'm', 'p', 'l', 'e'} );
    }
}