Crazy Buttons inside widget blueprint

Hello!

I’ve created some buttons using a widget blueprint to change the sun position in my level. I’m adding the widget to the viewport using my HUD blueprint.

The problem is: when i play the level some buttons turn gray, but they work normally. The strange thing is that each time that i play the buttons appear gray in a random way: sometimes is the first button, sometime the second, sometime two of them, sometimes all.

This is whats happening:

buttons1.jpg
69048a824f3f512659516e242cf74f137b007eac.jpeg

This is my Widget Blueprint:

eac072b467af5eb55093b46431be702841d11980.jpeg

And this is the HUD blueprint:

bbc1ee5ebc55897f57fa7f5c1aad1705772a5b98.jpeg

Someone can help me solving this?

Hello,
i am not sure about your issue (not enough blueprint visibility) but it may be because you don’t use your widget but your hud. Try to disconnect your events in your hud, then check if you have your hover effect on each button and the grey effect (is it possibly a texture like hover which appears when it would not ?) If yes it may be the issue : check that you have all your textures set in your buttons and use “bind” to create an event in your widget and set your events there instead of your hud.

I don’t know why you bind your buttons from the HUD BP, but you can create your widget from the HUD and bind every single button on your widget with 3 OnClicked Events.

Thanks for the reply Fen! My event can happen only in the Level Blueprint (Change sun position). So you are saying to add the widget to viewport using Level Blueprint, not the HUD?

Also, im binding the buttons in the Widget and using it to cast to HUD.

Actualy what im doing is:

Widget button cast to HUD, then in the HUD i detect the event and send a command to my Level Blueprint using an Interface BP. Finally, in the level blueprint i take the function from Interface BP and start a Change Sun position.

Thanks for the help!

Hi again!

I’ve removed the bind event from the Widget buttons and the buttons are fine now!

But my events are still happening on the HUD blueprint. There is a problem with that?

Regards!

Imho, the only trouble is when it does not work. Simply you would not need your bp_hud by using the widget and binding events in it. (as for example, in the umg quick start guide : https://docs.unrealengine.com/latest/INT/Search/index.html?x=0&y=0&q=umg+quick. But, it works… Cheers ! ^^

Hi Fen, thanks for the follow up! I’m having another problem in the same project, i think it might be a bug! Can you take a look? DoOnce MultiInput losing connections - Blueprint - Epic Developer Community Forums

Best regards!