I wounder if it’s possible to tag or reference a button created in widget? And to do this in Blueprint?
The reason is pretty much in this question post:
Is it maybe possible to use GamePlay Tags esxplained here?:
What I have down so far (but a bit tedious) is to set an int var just after each button is hovered.
After the set variable I am executing a CircularProgressBar function for about 2sec. After that I get the int var and use SwitchOnInt to direct the event flow depending on which button is hovered.
If the button is unhovered before the CircularProgressBar function has finished, it will abort the flow execution, with a isAbortProgressBar bool var just before the SwitchOnInt node.
Basically setting the bool just after the unhovered event.
I guess it works ok, but it feels it becomes ineffective if you have alot of buttons in a widget, having to set the int var repeatingly after each button event.
Easiest way to get what you’re looking for is to subclass the UButton class and create your own custom button. You can get references to your button or add a int variable to store the tag.
Thanks for the input Enearle, no worries but yes I was more looking for a smart way to tag a button if you have several of them. “CatsNipYummy” sent a very good link tut of how it could be done: