Can't find button OnClick callback event

This seems to be a really silly issue, but I am currently unable to get around it. I am trying to make a UI menu widget for my game. I want to have a button, saying “play game” that calls a function that will setup the game. I have already written the function, and I just need to bind it to the button. When I looked up how to do this, many sources online said to just go to the details for the button > Events > OnClicked.

However, it seems that my button object doesn’t have an events section, or onClicked option. Actually, after testing, it seems that no UI objects have an events section. Is there something I have to do first in order to enable UI related events that I don’t realize?

Note: this is on UE 5.2

2 Likes

Had the same problem, you can find the Events now in the Graph when you click on your Button under Variables Tab, then they appear under Details :slight_smile:

3 Likes

If AnyOne Face This.There is a option called is variable.Click one that You WIll get the Event Option

15 Likes

The dude above said correctly, but still I will leave the picture here:

21 Likes

Thank you so much, I was scratching my head to understand what I was doing wrong…
It was so straightforward for years in UE4 that I fail to see why Epic added this step ? :thinking:

What if you create a widget that has a button in it, thats all (think of it like a master button for quickly customising style across all buttons)
Then in another widget you use that user created button - except it has no on clicked event… how do i get the on clicked event for it???



Surely it’s not done like this?
Edit: Nope, that affects the parent button and hence all instances - i need on clicked for each instance

  • add a dispatcher to the button user widget:

  • parent can then:

You can pipe in some data, too. Also works for dynamic binding.


And if you wanted to bind the native button’s onClick, you can do it during the parent’s onInitialise.

2 Likes