Unity-Weld
Unity-Weld copied to clipboard
FloatToStringAdapterOptions removed at runtime
I am using a text field to read read/write a float value using a TwoWayPropertyBinding.
In the project view I have created some FloatToStringAdapterOptions and assigned it in the binding editor.
However, at runtime I get these errors:
Failed to convert value from Tooloop.DisplayGridViewModel.SizeX (Single) to TMPro.TMP_InputField.text (String).
UnityEngine.Debug:LogError(Object, Object)
UnityWeld.Binding.Internal.PropertySync:SyncFromSource()
UnityWeld.Binding.TwoWayPropertyBinding:Connect()
UnityWeld.Binding.AbstractMemberBinding:Init()
UnityWeld.Binding.AbstractMemberBinding:Start()
NullReferenceException: Object reference not set to an instance of an object
UnityWeld.Binding.Adapters.FloatToStringAdapter.Convert (System.Object valueIn, UnityWeld.Binding.AdapterOptions options) (at <72527601dcb64d0392e80b9b9438fc5f>:0)
UnityWeld.Binding.Internal.PropertyEndPoint.SetValue (System.Object input) (at <72527601dcb64d0392e80b9b9438fc5f>:0)
UnityWeld.Binding.Internal.PropertySync.SyncFromSource () (at <72527601dcb64d0392e80b9b9438fc5f>:0)
UnityEngine.Debug:LogException(Exception)
UnityWeld.Binding.Internal.PropertySync:SyncFromSource()
UnityWeld.Binding.TwoWayPropertyBinding:Connect()
UnityWeld.Binding.AbstractMemberBinding:Init()
UnityWeld.Binding.AbstractMemberBinding:Start()
The latter complains about missing adapter options which indeed are removed in the binding editor.
Am I using this wrong? How do I correctly assign the adapter options?