Skip to content

FloatToStringAdapterOptions removed at runtime #40

@vollstock

Description

@vollstock

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions