Hello,
I am using the untiy runtime binding with Unity 2023.3.0a6 and I’m trying to bind a dropdown.
So far I was able to bind the choices list and the index, changing value in code reflects change in UI.
The problem I have is that selecting something in the dropdown does not change the index value.
I thought it would be caused by a default binding-mode being wrong so I switched to TwoWay but it does not seem to have any effect.
Is this achievable through binding or am supposed to register to a change event ?
Thank you !
Hi @SebMaire , when an item is selected from the dropdown menu, it should go through the value
property of the DropdownField
, which should in turn notify that the index
has changed. The notification should be fired only if the underlying index actually changed.
Can you check what happens in the PopupField<T>.value
property when you select the item? The work should happen there.
If the notification is not fired up, please report a bug with a repro case so that we can investigate.
Thanks!
Had a quick look and there is indeed a bug in the property, we’ll get it sorted.
Thank you for raising it up!
Edit: Link to the issue.
1 Like
Hello,
I was able to do it with a change event (don’t remember the name of the callback), thanks for answering !
The fix should arrived swiftly. 