Create a hierarchy where an INPCBinding exists on a disabled gameObject
Assign a DataContext
Re-enable the gameObject hierarchy which contains the INPCBinding
Actual
INPCBinding will not bind to the ViewModel properly
Expected
INPCBinding should still bind to the view model
Investigation
INPCBindings register with the DataContext on Start(), and the bindings to the ViewModel are only done when the DataContext is set. This means that disabled INPCBindings will not be registered with the DataContext when ViewModels are set, and so will not be subscribed to the INPC event.
One workaround right now is to have a helper that rebinds the DataContext when one of these object hierarchies is enabled for the first time. However, it would be expected that new bindings that are registered while a DataContext is available should be bound immediately.
Repro Steps
Actual INPCBinding will not bind to the ViewModel properly
Expected INPCBinding should still bind to the view model
Investigation INPCBindings register with the DataContext on Start(), and the bindings to the ViewModel are only done when the DataContext is set. This means that disabled INPCBindings will not be registered with the DataContext when ViewModels are set, and so will not be subscribed to the INPC event.
One workaround right now is to have a helper that rebinds the DataContext when one of these object hierarchies is enabled for the first time. However, it would be expected that new bindings that are registered while a DataContext is available should be bound immediately.