Version: Unity 6 (6000.0)
Language : English
Parallel tessellation
Comparison of the binding systems

Data binding

Data binding synchronizes properties of non-UI objects, such as a string property on a MonoBehaviour, with properties of UI(User Interface) Allows a user to interact with your application. Unity currently supports three UI systems. More info
See in Glossary
objects, such as the value property of a TextField. A binding refers to the link between the property and the visual control that modifies it. Use bindings to synchronize values between a property and a specific visual elementA node of a visual tree that instantiates or derives from the C# VisualElement class. You can style the look, define the behaviour, and display it on screen as part of the UI. More info
See in Glossary
, so you don’t need to write event handlers when the value changes in the UI.

UI Toolkit supports two types of data binding systems that you can use to create bindings for the Editor UI and the runtime UI.

Topic Description
Comparison of the binding systems Compares the runtime binding and the SerializedObject data binding.
Runtime data binding Binds the properties of any plain C# object to the properties of a UI control. You can use this type of data binding in the runtime UI. You can also use it in the Editor UI as long as it’s not for serialized data.
SerializedObject data binding Binds the properties of a SerializedObject to the properties of a UI control. You can use this type of data binding only in the Editor UI.

Additional resources

Parallel tessellation
Comparison of the binding systems
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961