Set Hidden a static mesh inside a blueprint

Hi all, I cant figure out how to hide a static mesh inside a blueprint, via a widget button.
I thought I could use a Tag, and toggle the SetVisibility via the button. this work for the whole blueprint, but not for part of the blueprint.

My Blueprint has a few static meshes, some will always be visible, but one of the meshes I need to be able to toggle on/off at will via a Widget Button.

Adding a Tag inside the blueprint doesn’t seem to work. I think this is because its a component tag and not an actor tag. not 100% sure.

Grateful for any advice or steer in the right direction

  • what’s the connection between the actor and the widget?
  • how does the actor and the widget make it into the game?
  • what’s the scenario?

in the worst case scenario one can fetch an actor by tag and then look up components by tag/class but this is, generally speaking, an awkward & borderline horrible solution. Neater alternatives exists but we’d need more details regarding the setup.

  • what’s the connection between the actor and the widget?
    I don’t think I have one, I’m not sure how to call or get a reference of the BP into the widget

  • how does the actor and the widget make it into the game?
    BPActor is manually placed in various levels, widget is cast onscreen and all buttons working

  • what’s the scenario?
    A BP contains various static meshes (Red Cube, Green Cube) The green Cube is Hidden in Game as default.

BP is placed around the level scene, shows only the Red Cube.

The widget displays an onscreen button, I want to press this button to Toggle the Green Cubes Hidden visibility.

This is what I have at the moment, but nothing happens, i get the print string but nothing else

Sadly, this does not explain how the widget gets to the viewport. I believe that by cast onscreen you mean that you Add To Viewport. We still do not know where and how you create the widget so I’ll assume it’s done in the Level Blueprint for now.

  • in the actor that has multiple components, one of which we’re trying to hide:

  • in the Level Blueprint:

There’s no script in the widget as it’s not necessary here. The above is still somewhat rigid and may be a pretty bad choice. But we do not know what you need it for :person_shrugging: Perhaps it’s perfect and all that is needed.


Oftentimes, what we’re trying to achieve will dictate a choice of the tool. And BP comms are a prime candidate for such choices as there’s a dozen methods to make actors talk to one another. All depends on the circumstances.

BP is placed around the level scene, shows only the Red Cube.

The widget displays an onscreen button, I want to press this button to Toggle the Green Cubes Hidden visibility.

This is what I have at the moment, but nothing happens, i get the print string but nothing else

I think this was edited in as I was typing. What I suggested above still applies; but may need to be re-factored depending on what else is needed further down the line.

what’s the connection between the actor and the widget?
I don’t think I have one, I’m not sure how to call or get a reference of the BP into the widget

What I meant was:

  • is there only 1 widget interacting with 1 actor ever? If so, then create a widget inside the actor.
  • is the widget controlling more than 1 actor?
  • are there many widgets that control many actors?
  • are we going to reuse the whole thing in many levels

I’d script each scenario differently. I see you refer to something as POI - indicating we will be dealing with multiple points of interest. Word of advice, avoid Get All by Class / Get something by tag if you can.

if you ever have more than 1 POI, this will immediately stop to work.


Also, it may really pay off just to plainly explain the ultimate goal which puts things in perspective. What are we making? A building queue in a top-down strategy game?