Version: 2021.1
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_1Initializes a QueryBuilder.

Public Methods

ActiveSelects all elements that are active.
AtIndexConvenience overload, shorthand for Build().AtIndex().
BuildCompiles the selection rules into a QueryState object.
CheckedSelects all elements that are checked.
ChildrenSelects all direct child elements of elements matching the previous rules.
ClassSelects all elements with the given class. Not to be confused with Type (see OfType<>()).
DescendentsSelects all elements that are descendants of currently matching ancestors.
EnabledSelects all elements that are enabled.
FirstConvenience overload, shorthand for Build().First().
FocusedSelects all elements that are enabled.
ForEachConvenience overload, shorthand for Build().ForEach().
HoveredSelects all elements that are hovered.
LastConvenience overload, shorthand for Build().Last().
NameSelects element with this name.
NotActiveSelects all elements that are not active.
NotCheckedSelects all elements that npot checked.
NotEnabledSelects all elements that are not enabled.
NotFocusedSelects all elements that don't currently own the focus.
NotHoveredSelects all elements that are not hovered.
NotVisibleSelects all elements that are not visible.
OfTypeSelects all elements of the specified Type (eg: Label, Button, ScrollView, etc).
ToListConvenience method. shorthand for Build().ToList.
VisibleSelects all elements that are visible.
WhereSelects all elements satifying the predicate.

Operators

operator !=Compare two QueryBuilder objects and return true if they are not equal.
operator ==Compare two QueryBuilder objects and return true if they are equal.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961