文档

Unity Engine

Unity Engine

Query

Initializes a QueryBuilder with the specified selection rules.
阅读时间2 分钟最后更新于 1 个月前

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.