Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DataBinding

Binding type that enables data synchronization between a property of a data source and a property of a VisualElement.
Read time 2 minutesLast updated 5 days ago

Definition

public class DataBinding : Binding, IDataSourceProvider

Constructors

Constructor

Description

DataBinding()Initializes and returns an instance of DataBinding.

Properties

Property

Description

bindingModeControls how this binding should be updated. The default value is BindingMode.TwoWay.
dataSourceObject that serves as a local source for the binding, and is particularly useful when the data source is not part of the UI hierarchy, such as a static localization table. If this object is null, the binding resolves the data source using its normal resolution method.
dataSourcePathPath from the data source to the value.
dataSourceTypeThe possible data source types that can be assigned to the binding.
sourceToUiConvertersReturns the ConverterGroup used when trying to convert data from the data source to a UI property.
uiToSourceConvertersReturns the ConverterGroup used when trying to convert data from a UI property back to the data source.

Methods

Method

Description

ApplyConverterGroupToSourceApplies a ConverterGroup to this binding that will be used when converting data between a UI control to a data source.
ApplyConverterGroupToUIApplies a ConverterGroup to this binding that will be used when converting data between a data source to a UI control.

Inheritance