unity does public Text also work with textmesh pro code example
Example: unity textmesh pro
using UnityEngine;
using TMPro;
public class UiManager : MonoBehaviour
{
[SerializeField]
private TextMeshProUGUI TMPtext;
}
using UnityEngine;
using TMPro;
public class UiManager : MonoBehaviour
{
[SerializeField]
private TextMeshProUGUI TMPtext;
}