Query
Initializes a QueryBuilder with the specified selection rules.
Read time 2 minutesLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
Query(VisualElement, string, string[])
Initializes a QueryBuilder with the specified selection rules.
public static UQueryBuilder<VisualElement> Query(this VisualElement e, string name = null, params string[] classes)
Parameters
Root VisualElement on which the selector will be applied.
If specified, will select elements with this name.
If provided, it selects elements with the specified class (case sensitive, to be distinguished from Type).
Returns
Type | Description |
|---|---|
| UQueryBuilder<VisualElement> | QueryBuilder configured with the associated selection rules. |
Query(VisualElement, string, string)
Initializes a QueryBuilder with the specified selection rules.
public static UQueryBuilder<VisualElement> Query(this VisualElement e, string name = null, string className = null)
Parameters
Root VisualElement on which the selector will be applied.
If specified, will select elements with this name.
If provided, it selects elements with the specified class (case sensitive, to be distinguished from Type).
Returns
Type | Description |
|---|---|
| UQueryBuilder<VisualElement> | QueryBuilder configured with the associated selection rules. |
Query<T>(VisualElement, string, string[])
Initializes a QueryBuilder with the specified selection rules.
public static UQueryBuilder<T> Query<T>(this VisualElement e, string name = null, params string[] classes) where T : VisualElement
Parameters
Root VisualElement on which the selector will be applied.
If specified, will select elements with this name.
If provided, it selects elements with the specified class (case sensitive, to be distinguished from Type).
Returns
Type | Description |
|---|---|
| UQueryBuilder<T> | QueryBuilder configured with the associated selection rules. |
Query<T>(VisualElement, string, string)
Initializes a QueryBuilder with the specified selection rules.
public static UQueryBuilder<T> Query<T>(this VisualElement e, string name = null, string className = null) where T : VisualElement
Parameters
Root VisualElement on which the selector will be applied.
If specified, will select elements with this name.
If provided, it selects elements with the specified class (case sensitive, to be distinguished from Type).
Returns
Type | Description |
|---|---|
| UQueryBuilder<T> | QueryBuilder configured with the associated selection rules. |
Query(VisualElement)
Initializes a QueryBuilder with the specified selection rules.
public static UQueryBuilder<VisualElement> Query(this VisualElement e)
Parameters
Root VisualElement on which the selector will be applied.
Returns
Type | Description |
|---|---|
| UQueryBuilder<VisualElement> | QueryBuilder configured with the associated selection rules. |