private void CreateBinding() { if (updateMode == UpdateMode.SetProperty) { // create one way to source binding binding = new Binding(valuePath, this, "AnalogValue", Binding.BindingMode.OneWayToSource); binding.SetFlags(Binding.ControlFlags.ResetSourceValue); } else if (updateMode == UpdateMode.CallAction) { // create one way binding binding = new Binding(valueChangedPath, this, "AnalogValueChanged"); binding.SetFlags(Binding.ControlFlags.ResetTargetValue); } else { Debug.LogError("Unsupported update mode"); return; } BindingUtility.AddBinding(binding, transform, out dataContext); }
private void CreateBinding() { binding = new Binding(path, this, "StringValue"); BindingUtility.AddBinding(binding, transform, out dataContext); }