Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UxmlElementAttribute

Exposes a type of VisualElement to UXML and UI Builder
Read time 1 minuteLast updated 11 days ago

Definition

UxmlElementAttribute()

Exposes a type of VisualElement to UXML and UI Builder
public UxmlElementAttribute()

UxmlElementAttribute(string)

Declares a custom control with a custom element name.
public UxmlElementAttribute(string uxmlName)

Parameters

uxmlName

Provides a custom name for the element.

UxmlElementAttribute(string, Type[])

Declares a custom control with a custom element name and a list of supported child types.
public UxmlElementAttribute(string uxmlName, params Type[] supportedTypes)

Parameters

uxmlName

The name to use for the element in UXML, such as
my-custom-element
.

supportedTypes

An array of supported child element types. This can be passed as individual
Type
arguments.