Modify UMG widget values from Level BP

Make sure you save a reference to the created widget.

You can then target the reference and either set values or call functions to set values.

To make sure a widget component is public

  • Click on the component in the widget editr
  • Find the details panel
  • At the top is a boolean checkbox Is Variable, make sure this is set to true

My UMG widget is a spinbox, and I’m trying to set its default value from the Level BP when it’s created and added to viewport.

I don’t know how to access the variables in the UMG from the level BP, so I thought it’d be easier to send the value to the OnCreateEvent on the UMG class, so I can set the value there., but I don’t understand how to get this method working.
I’m not sure how to go about doing this, so any help would be appreciated.

Yeah the level bp spawns it. I don’t mind where its set from to be honest, just using level bp because it holds the values I want to set it to

Adding call functions and setting the components Is Variable on worked! I just binded the events after the UMG widget would spawn. Using Get all widgets of Class found all the widgets to be edited, so there was no problem on that end too.