Structure UI with C# scripts
Create a custom control

Custom controls

You can create custom controls and implement custom logic for user interface elements.

Topic Description
Create custom controls Understand the basics of creating and using custom controls.
Customize the custom control UXML tag name Customize the UXML tag name for your custom control.
Define UXML attributes for built-in types Define UXML attributes for a custom control to expose properties in UXML and UI Builder.
Define UXML attributes for complex data types Use attribute converter and UxmlObject to define UXML attributes for complex data types.
Customize UXML attributes Customize UXML attributes’ names, behaviors, decorators, and property drawersA Unity feature that allows you to customize the look of certain controls in the Inspector window by using attributes on your scripts, or by controlling how a specific Serializable class should look More info
See in Glossary
in UI Builder.
Bind custom control to data Bind custom controls to serialized properties to synchronize values between the control and the property.
Define a namespace prefix Use UxmlNamespacePrefix attribute to define a namespace prefix.
Troubleshooting custom control library compilation Troubleshoot issues with custom control library compilation.

Additional resources


Did you find this page useful? Please give it a rating:

Structure UI with C# scripts
Create a custom control