UE 5.2 - Hide object/change visibility via menu/widget

I previously posted about this and using a keyboard shortcut was simple in the end.

I am back to trying to figure out how to hide/show a waterbodycustom via a menu.

Still being new I cannot figure out how in the menu to on click event select the water and change its visibility.

The main problem I am struggling with is how to select it. Every type of thing seems to just create some circular problem of wanting to know what object. Is there no simple selection of “select an object called this” then “set its visibility” which was straight forward with a hot key in its own blueprint.

FlipFlop, visibility, no problem to understand but how do I tell the “on clicked” to specifically select the waterbodycustom BP.

Thanks, will check it out

Need to mention that select may be the wrong term. I need from a menu/button to tell an object in the scene to set visibility to off. Maybe not necessarily “select” like selecting an object on screen in the editor. Read some about casting.

Looking at the link shared previously today.

I don’t follow. Link I shared isn’t what you needed?

I am reading it now to see if it helps me resolve this.

I realized that my description may not be correct for whatever logic is required. I am thinking too linear perhaps. I was wondering if “select” is wrong and its more like casting or passing the info from one BP to another and that may be why I am struggling to understand this.

I was able to do this simply with a hotkey setup inside the objects BP.

The problem I am working out now is:

button->Click button->(Pass this click to an object in the scene) → Flip the visibility parameter of the object called to

I have a widget menu with a button.
When this button is clicked, I want a specific object in the scene to set its visibility to “On” if its “Off” and vice versa.

Working through the link/doc now to see if that clears it up for me.

I’ll say what you mean by “select” is called a reference.

1 Like

Using the link you shared this appears to work. Need to read of the “for each loop” to understand what it does specifically.

Thanks for the guidance.

Glad to hear.

If you solved this problem, make sure to mark this thread as solved.

1 Like

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