- Home /
How can you use UQuery to access child nodes?
Say I've got a UIDocument with the following layout, and I want to select the second big_text
element (a Label).
root
content
big_text
footer
big_text
The docs for UQuery tell you that it's based on jQuery, but doing root.Q("footer big_text")
returns the nothing (since #footer #big_text
is what you'd expect in jQuery).
How can I access the second element named big_text
?
Answer by tankorsmash · May 19, 2021 at 08:59 PM
The answer seems to be chaining the queries:
root.Q("footer").Q("big_text");
Your answer
Follow this Question
Related Questions
Accessing C# Delegate from Javascript 1 Answer
How to create UIToolkit/UIElements menu for com.unity.localization package? 1 Answer
How do I update an image on a visual element at runtime in ui toolkit? 0 Answers
Text Input Field using UIToolkit 0 Answers
Can't resolve UnityEngine.UIElements.UIDocument type with UIToolkit 1 Answer