Comments (3)
Textmesh pro is a third plug-in, You can refer to the GameObjectText
function in UnityNode.cs
to get the attr of TEXT INPUT BOX by yourself.
from poco-sdk.
Hi! I need to be able to read TextMeshPro text too, but i'm having some problems when trying to do this, help would be appreciated.
For my needs, i've modified the GameObjectText function to return TMP_Text if available and the normal Text if not. Here is my code:
private string GameObjectText()
{
TMP_Text tmpText = gameObject.GetComponent<TMP_Text>();
if (tmpText) return tmpText.text;
Text text = gameObject.GetComponent();
if (text) return text.text;
return null;
}
With this implementation, when i'm connected to an Android phone, i'm always getting the default value that is setted on the Unity Inspector, but not the actual updated value that i'm seeing ingame. It doesn't matter if it's through Airtest UI-hierarchy view or by poco("MoneyButtonText").get_text() on Python.
The normal Text (not TMP text) is updating without problems and sends always the last value.
For some reason, the solution works flawless over UnityEditor.
Is there any way to "update" the value, the dump, or whatever is needed?
Thanks in advance
from poco-sdk.
I've solved it by changing this line
if (tmpText) return tmpText.text;
to
if (tmpText) return tmpText.GetParsedText();
from poco-sdk.
Related Issues (20)
- UnityEditor获取不到游戏画面
- UE5 无法使用UE4 Poco SDK吗? HOT 1
- Unity poco ios: ios 上接入Unity的游戏,操作一段时间后(获取元素,点击元素)会出现poco socket 断开的情况 HOT 1
- 在 [Hunter] 里直接配置,请问hunter是什么哪设置?safaia又是什么
- UE4.18版本,按照说明文档接入PocoSDK后,在IDE中无法识别控件
- "Select invalid payload" error encountered while using Poco Auto Recording
- any one survival
- [Unity3D sdk] 一堆报错无法使用.
- PC的微信小游戏 能否 分析UI结构?
- 新版加入了个PocoListenersBase类,按照之前的文档集成后会提示报错,无法运行,是否有对应的新版集成文档?
- IOS客户端上的UE4游戏如何接入poco?
- 启动Unity3D app时会导致app crash,tcpserver启动链接失败
- document needs to be improved
- cocos2dx接入PocoSDK,部分界面获取元素报错
- [Unity3D sdk 集成] unity出window包,poco定位有偏差
- [unity3d poco sdk整合] 双屏幕下poco获取窗口错误 HOT 1
- U3D Fgui接好POCO后,获取的控件坐标都为0 HOT 1
- Unity Poco SDK 接入之后,安卓APK获取不到UI树,Unity Game窗口下能正常获取
- The type or namespace name 'AbstractNode' could not be found (are you missing a using directive or an assembly reference?) HOT 1
- rpc.addRpcMethod怎么使用和自己添加 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poco-sdk.