I am used to (from other tutorials) using the class TMP_Text
to manage Text Mesh Pro Text, insted of the class TextMeshPro
used in this chapter of the course. Using this approach worked perfectly.
Are they different, are they interchangeable?
Here is the code I made:
using TMPro;
using UnityEngine;
public class GridDebugObject : MonoBehaviour
{
[SerializeField] private TMP_Text gridText;
private GridObject gridObject;
public void SetGridObject(GridObject gridObject)
{
this.gridObject = gridObject;
}
private void Update()
{
gridText.text = gridObject.getGridPositionString();
}
}