Property Binding
Use a property binding when a State Designer Shared Variable and a property on one of your components should represent the same value. This lets States and Actions work with a value such as health while other gameplay code continues to use the component property.
The PropertyBinding sample scene contains a working example.
Prepare the property
The component must expose a C# property with both a getter and a setter. This example exposes the current health amount:
public class Health : MonoBehaviour
{
[Tooltip("The starting health value")]
[SerializeField] protected float m_StartHealth = 100;
private float m_HealthAmount;
public float HealthAmount { get => m_HealthAmount; set => m_HealthAmount = value; }
}
Bind the Shared Variable
- Create a Shared Variable with the same value type as the property.
- Right-click its row in the Shared Variables pane and select Enable Property Binding.
- In Object, select the GameObject or component that owns the property.
- In Binding, select the compatible property.

How it runs
The binding connects SharedVariable.Value directly to the selected property. Reading the Shared Variable calls the property getter. Writing the Shared Variable calls the property setter. Code inside and outside the State Machine therefore uses the same underlying value.
Choose the source and value flow
- Object: Select the GameObject or component that contains the property. When a GameObject is selected, State Designer finds the component that declares the chosen property.
- Binding: Select a public instance property whose value type matches the Shared Variable.
- Value flow: Property binding is two-way. Reads use the getter and writes use the setter; there is no separate direction setting.
Verify the binding
- Enter Play Mode with a known value on the bound component property.
- Read the Shared Variable and confirm that it returns the property value.
- Change the Shared Variable from a State or Action and confirm that the component property changes.
- Change the property through another script and confirm that the next Shared Variable read returns the updated value.
Supported caveats
- The property must provide both a getter and a setter.
- Property binding does not work with fields.
- The property type must match the Shared Variable type.
- Property bindings are supported on non-project-level variables; Project variables cannot reference a component property.