unity change tmp text from script

Code Example - unity change tmp text from script

                
                        using UnityEngine.UI;
using TMPro;

void Update()
{
    TextMeshPro lemonsss = GetComponent<TextMeshPro>();
}
                    
                
 

unity get textmesh pro component

                        
                                GetComponent<TMPro.TextMeshProUGUI>().text
                            
                        
 

get component text mesh pro

                        
                                GetComponent<TMPro.TextMeshProUGUI>().text