UMG Widget Button hit testable on initialize when set to non hit testable (Self only)

Hello,

I am pulling my hair out trying to figure out why my button is visible (Hit testable)
I have no calls in animation to visibility.
I have it set by default to non hit testable (SelfOnly).


I have an on initialize setting it again to make sure.

Unnecessary but it doesn’t change the fact.
Widget is created and focused full screen on level blueprint.

On PIE it is ready to rumble sounds and all.

The only call to make it visible is on another button. which doesnt have to be hit.

Thanks,

I wouldn’t attempt this onInitalised, can you do it after EventConstruct instead? Doubt the button is ready before that. What’s happening is probably Construct overriding whatever you’re trying to set up earlier. Also, no reason for DoOnce - Init runs only once - that’s the point.

Some things work great onInitalised - like Event Dispatcher binding since this has nothing to do with laying out widgets.

Yeah all these were after-thoughts.

I’ve messed with he config of them, for every scenario its the same result.

Is there anything I can expose to help someone understand?

No additional Init / Construct script is needed here. It’s this, most likely:

image

The button cannot be hit directly, sure, but the text is probably set to Visible, and it will actually bubble up in the hierarchy and hit the button - buttons are evil like that.

  • either set the Button to NH-T (Self and All Children)
  • or set the nested element (text) to NH-T (Self), too
1 Like

Unbelievable.

Here’s the thing. Thats fixed it…

I had already thought about this already but I have had cases where the button text occluded the button and wouldn’t let you click on it unless you had the text child set to visible. So I treated it like a no go zone/proper child behaviour.

Thank you

1 Like

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