Blueprint interfaces and event dispatchers wont work because you can’t get the reference.
If you use the return value of the create widget node instead, you can only send information once, any ‘set’ that runs after the initial one will do nothing.
So how do you update a variable sent to the widget?
You can save the reference, you must be doing something wrong.
btw casting has nothing wrong besides being faster.
Use interfaces if you need to get variables or call functions from multiple widgets which is almost never the case.
In response to your first part, using get to talk to the widget only works for executive things such as remove from parent. If I want to update the variables inside the widget I must use set. But the problem with that is it only works once.
For the second part, if I were to use an interface for example, I can’t set that reference myself because there is simply no option to select it, see images
The script is fine, If this fires only once, the problem is elsewhere. How are you testing it? Is your input even working? It is disabled by default in actors.
The other thing is not an interface. You must first create one, add function, add it to the class:
Add implementation in the said class and, finally, call it using a reference. What you’re showing is a null reference variable. These cannot be filled upfront because the widgets do not exist outside PIE.
I have an interface in the project but ‘finally, call it using a reference’ is the problem. How do I get a working reference to call it if I can’t fill in the reference because it’s a widget.
I have input enabled which works for other logic within that blueprint, but not the widget- the widget has a text box bound to ‘Widget Value’ float but wont receive updates. No matter how many times I press it remains at the first value.
I can get a print string to successfully update the way you show, but no variable inside the widget will do the same.
It’s not the comms, it’s something dodgy in the widget. Something overrides the value or we’re watching the wrong value. Anything out of the ordinary there? You sure it’s the right var?
Yeah I think it’s set up right.
It works once meaning it fully accepts any default value, or the value of another variable and displays that but wont respond to the key press or another changing variable method.
I made this project anew so there’s not much. Anything other than what you see is either deleted or never used in this one. Happens the same in my other projects. Only 1 widget and 2 references of the variable.