Bind custom Variable in UMG Widget

Hi,

I have an UMG Widget that has an editable Variable. If I use this Widget in another widget I can set the variable in the Designer (Thank you for this very nice Feature :slight_smile: ).
It should be possible to bind this variable to a function.

I’m going to need a better description to be sure of what you’re asking for, but if you just want any new variable you define to be bindable, that’s a long way off from being possible. The properties that are bindable are 2 separate properties hidden by the property view into a single property. Under the hood it’s the raw default property value, and then another that’s a script delegate to hold the function pointer for a bound function. Then when the widgets are created we manually turn that into a TAttribute for that property type, which Slate natively understands, but nothing else in the engine deals with them.

If you want to make a new UWidget you can follow this same pattern to make bindable properties for your native slate widgets TAttributes, but no blueprint variables defined in a UserWidget can have this feature, not without some really complex refactoring.

This is exactly what I mean. Thank you for explain it. I can live without this feature :slight_smile:

Just wanted to comment and add my 2c that this would be a really, really good feature.

Is this still relevant? It has been a few years and I am wondering if there is an update to this?

Still highly relevant. It’d make things a lot easier.

1 Like