UButton how to Bind hanve param function

UButton how to Bind hanve param functions???

1 Like

What is a “hanve param function?”

“hanve” doesn’t match anything in my dictionary.

Can you post some code you’re trying to use, that doesn’t work?
Or screen shots of a blueprint you’re trying to use?

I use UE5.1


I want the button clicked to execute this function but I only found the following binding method without parameters on the Internet

Yes, when clicking a button, there is no data on that button.
Typically, you will bind it to a function that extracts the data in question from some other field, and then calls the function that uses the data.

If the data is already known at time of binding, you can use BindLambda() to bind a lambda that calls the appropriate function with the known data:

It may be that the OnClicked delegate is dynamic, which may not work with BindLambda(), in that case, you need to create a very small UObject subclass whose only purpose is to contain the data and call through to the function you want, and then bind the UFUNCTION on that UObject.

2 Likes

thanks you

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.