“Comment changer TextMesh Pro Unity” Réponses codées

Unity Get TextMesh Pro Component

GetComponent<TMPro.TextMeshProUGUI>().text
Cruel Caribou

Comment changer TextMesh Pro Unity

// If you are trying to chnage the text on a TextMeshPro:
  
public TextMeshPro TextMeshProObject;
//you shouldnt need to get component the editor should take care of this for you when 
//you drop it since you have the object set to TextMeshPro and not just GameObject
TextMeshProObject = GetComponent<TextMeshPro>();
TextMeshProObject.text = "Hello";

// If you are trying to change the text from a gameobject:
TextMeshProUGUI TextMeshProLable = YourGameObject.GetComponent<TextMeshProUGUI>();
TextMeshProLable.text = "Your Text"

Obnoxious Oystercatcher

Réponses similaires à “Comment changer TextMesh Pro Unity”

Questions similaires à “Comment changer TextMesh Pro Unity”

Plus de réponses similaires à “Comment changer TextMesh Pro Unity” dans C#

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code