diff --git a/Unity3D/ugui/UnityNode.cs b/Unity3D/ugui/UnityNode.cs index b51212a..694cfc3 100644 --- a/Unity3D/ugui/UnityNode.cs +++ b/Unity3D/ugui/UnityNode.cs @@ -26,6 +26,8 @@ public class UnityNode : AbstractNode { "Selectable", "Selectable" }, { "Camera", "Camera" }, { "RectTransform", "Node" }, + { "TextMeshProUGUI","TMPROUGUI" }, + { "TMP_Text","TMPRO" }, }; public static string DefaultTypeName = "GameObject"; private GameObject gameObject; @@ -212,8 +214,13 @@ private bool GameObjectClickable(List components) private string GameObjectText() { + TMP_Text tmpText = gameObject.GetComponent(); + if (tmpText) return tmpText.GetParsedText(); + TextMeshProUGUI tmpUIText = gameObject.GetComponent(); + if (tmpUIText) return tmpUIText.GetParsedText(); Text text = gameObject.GetComponent(); - return text ? text.text : null; + if (text) return text.text; + return null; } private string GameObjectTag()