From ebab376b0cee7f2552f428cea10026bccc319127 Mon Sep 17 00:00:00 2001 From: Kornei Dontsov Date: Mon, 16 Jan 2023 16:48:40 +0300 Subject: [PATCH] [Unity3D-sdk] Remove dependency on TextMeshPro from ugui/UnityNode.cs Documentation in README says that folder 'ugui' should be chosen when target project uses UnityEngine.UI without TextMeshPro. But at the moment ugui/UnityNode.cs is not working without TextMeshPro. These changes fix it. The commit actually roll back the changes made in commit 90376b987c90e0671c4c42bf9796d116484befbd last year. Probably, they was forgotten to roll back when TextMeshPro support was split to separate folder 'uguiWithTMPro'. --- Unity3D/ugui/UnityNode.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Unity3D/ugui/UnityNode.cs b/Unity3D/ugui/UnityNode.cs index c9ba1b6..ddcfb57 100644 --- a/Unity3D/ugui/UnityNode.cs +++ b/Unity3D/ugui/UnityNode.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using UnityEngine.UI; using UnityEngine; -using TMPro; namespace Poco @@ -27,8 +26,6 @@ public class UnityNode : AbstractNode { "Selectable", "Selectable" }, { "Camera", "Camera" }, { "RectTransform", "Node" }, - { "TextMeshProUGUI","TMPROUGUI" }, - { "TMP_Text","TMPRO" }, }; public static string DefaultTypeName = "GameObject"; private GameObject gameObject; @@ -215,16 +212,6 @@ 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; }