Sending text from UMG Text Box to a blueprint

Hey guys!

I’m stuck. I am trying to have text that the user types into a UMG text box populate in the environment at the same time. Here I am setting the text, and triggering the event in TextSwap BP. The ‘Enter Text Box’ variable is in the TextSwap blueprint. So I figure’d setting that here would be the fastest way.

The problem seems to be that the event in the blueprint never gets triggered when the text in the UMG element is changed.
Here is the TextSwap BP side.

Thanks in advance for any insight you may be able to lend.

You need to make event dispatcher here. Widget needs to have event dispatcher, then blueprint needs to assign some graph to that event dispatcher.

in steps you need to do:

  • add event dispatcher in widget, call it: Dispatcher_dimensional_line
  • in blueprint do get all actors of class (that widget), get element 0 from that array (if there is single widget).
  • then cast to widget type, and
  • in as widget type assigh to Dispatcher_dimensional_line,

then rest is as you are doing:

  • call that dispatcher from widget when text is changet
  • it will call your asigned graph in blueprint

Does Event Dispatcher just mean custom event?
What do you mean ‘Cast to widget type?’
None of the cast to options I found have an input for an event dispatcher.

Really new to UMG stuff, and the Docs on Dispatchers are quite confusing. Seems like they have changed quite a bit about event dispatchers since the docs were written. For instance when I right click in my graph and go to ‘Event Dispatchers’ with context sensitive on, the only option is ‘Create Event’. I am in 4.8

Alright, here is what I got (still not working) I had to replace the get all actors of class with get all widgets of class since it wouldn’t let me select my MainMenu widget.

Is this about what you were talking about?

Alright, Well I think I am getting closer anyways. Finally found where the event dispatchers were. Made me feel kind of silly for not seeing them before hahaha.

Still not working though, But I can see the light at the end of the tunnel. Thanks for the push in the right direction. Gona go find some more tuts.

Woot, finally got it. It was a lot of new stuff to wrap my head around but I feel better for it!

Here is the final working version: