O
OneJS14mo ago
Singtaa

You can get the root VE via `UIDocument.

You can get the root VE via UIDocument.rootVisualElement (it's the UIDocument on the ScriptEngine GameObject) and find your TextField using UQuery: https://docs.unity3d.com/Manual/UIE-UQuery.html
4 Replies
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
Singtaa
SingtaaOP14mo ago
Any of the following works:
Query<TextField>().First();
Q<TextField>();
Query<TextField>().First();
Q<TextField>();
Or if you have a classname on the TextField:
// <textfield ref={ref} class="myTextField" multiline={true} />
Query(className: "myTextField").First();
Q(className: "myTextField");
// <textfield ref={ref} class="myTextField" multiline={true} />
Query(className: "myTextField").First();
Q(className: "myTextField");
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
Singtaa
SingtaaOP14mo ago
awesome!
Want results from more Discord servers?
Add your server