Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Handle type data generically with Unity Properties

Use the Unity Properties API to generically discover and manipulate object properties at runtime.
Read time 1 minuteLast updated 5 days ago

The Unity Properties API, in the
Unity.Properties
namespace, uses a visitor design pattern to visit .NET objects at runtime. Visiting objects allows you to discover and modify their properties and add new operations to an existing object structure at runtime without modifying the structure itself. You can build various functionalities on top of the visitor pattern, such as serialization, data migration, deep data comparisons, and data binding.

Topic

Description

Introduction to Unity PropertiesUnderstand the fundamentals and uses of the Unity Properties API.
Property bagsUnderstand the role of property bags and the performance considerations when using them.
Property visitorsUnderstand the role of property visitors and the performance considerations when using them.
Property pathsUnderstand the role of property paths and the performance considerations when using them.
Create a property visitor with the PropertyVisitor classLearn how to use the
PropertyVisitor
base class to create a property visitor from an example.
Create a property visitor with low-level APIsLearn how to use the
IPropertyBagVisitor
and
IPropertyVisitor
interfaces to create a property visitor from an example.

Additional resources