Hello, in my game project, there will be a situation where an Attribute is bound to multiple values. For example, the left-hand item and the right-hand item in UCC integration are bound to an attribute at the same time.
In the present case, such multiple bindings can only be one-way. For example, ItemObjectBinding in UCC integration is one-way, although it still has the problem of not being able to synchronize properties in real time.
So I decided to expand AttributeBinding and add a bool to AttributeBindingBase indicating whether it is a two-way binding to control whether to call Attribute.Bind() or directly register the Attribute.OnAttributeChanged event when binding.
Is this solution feasible? Please let me know if there is a better way, thanks!
(This solution should be able to solve the problem of ItemObjectBinding at the same time)
In the present case, such multiple bindings can only be one-way. For example, ItemObjectBinding in UCC integration is one-way, although it still has the problem of not being able to synchronize properties in real time.
So I decided to expand AttributeBinding and add a bool to AttributeBindingBase indicating whether it is a two-way binding to control whether to call Attribute.Bind() or directly register the Attribute.OnAttributeChanged event when binding.
Is this solution feasible? Please let me know if there is a better way, thanks!
(This solution should be able to solve the problem of ItemObjectBinding at the same time)