I am adding texts to a TextMeshPro but I do not know how can one delete the previously entered text from the textbox. All I have found online was string.empty() which I am not looking for. For example
public TMP_Text textMeshPro;
void Start()
{
textMeshPro.text = "85" + "<sprite index=0>";
}
So in such a case given above, if I click on "backspace", the sprite should get deleted first, then if I press backspace again, 5 should get deleted and finally 8. That is each string should be deleted like how we do on a calculator. Is there a way to achieve this?