Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

UQueryBuilder<T0>

struct in UnityEngine.UIElements

/

Implemented in:UnityEngine.UIElementsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Utility Object that contructs a set of selection rules to be ran on a root visual element.

Constructors

UQueryBuilder_1 Initializes a QueryBuilder.

Public Methods

Active Selects all elements that are active.
AtIndex Convenience overload, shorthand for Build().AtIndex().
Build Compiles the selection rules into a QueryState object.
Checked Selects all elements that are checked.
Children Selects all direct child elements of elements matching the previous rules.
Class Selects all elements with the specified class in the class list, as specified with the class attribute in a UXML file or added with VisualElement.AddToClassList method.
Descendents Selects all elements that are descendants of currently matching ancestors.
Enabled Selects all elements that are enabled.
First Convenience overload, shorthand for Build().First().
Focused Selects all elements that are focused.
ForEach Convenience overload, shorthand for Build().ForEach().
Hovered Selects all elements that are hovered.
Last Convenience overload, shorthand for Build().Last().
Name Selects element with this name.
NotActive Selects all elements that are not active.
NotChecked Selects all elements that not checked.
NotEnabled Selects all elements that are not enabled.
NotFocused Selects all elements that don't currently own the focus.
NotHovered Selects all elements that are not hovered.
NotVisible Selects all elements that are not visible.
OfType Selects all elements of the specified Type (eg: Label, Button, ScrollView, etc).
ToList Convenience method. shorthand for Build().ToList.
Visible Selects all elements that are visible.
Where Selects all elements satifying the predicate.