Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Query

Initializes a QueryBuilder with the specified selection rules.
Read time 2 minutesLast updated 12 days ago

Definition

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.

name

If specified, will select elements with this name.

classes

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.

name

If specified, will select elements with this name.

className

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.

name

If specified, will select elements with this name.

classes

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.

name

If specified, will select elements with this name.

className

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.