Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


OfType

Selects all elements of the specified Type (eg: Label, Button, ScrollView, etc).
Read time 1 minuteLast updated 13 days ago

Definition

OfType<T>(string, string[])

Selects all elements of the specified Type (eg: Label, Button, ScrollView, etc).
public UQueryBuilder<T2> OfType<T2>(string name = null, params string[] classes) where T2 : VisualElement

Parameters

name

If specified, will select elements with this name.

classes

If specified, will select elements with the given class (not to be confused with Type).

Returns

Type

Description

UQueryBuilder<T>QueryBuilder configured with the associated selection rules.

OfType<T>(string, string)

Selects all elements of the specified Type (eg: Label, Button, ScrollView, etc).
public UQueryBuilder<T2> OfType<T2>(string name = null, string className = null) where T2 : VisualElement

Parameters

name

If specified, will select elements with this name.

className

If specified, will select elements with the given class (not to be confused with Type).

Returns

Type

Description

UQueryBuilder<T>QueryBuilder configured with the associated selection rules.