UE 5.2 Best way to hide Actor or Component in Editor, Blueprint

My intent is to hide a component in a blueprint while in editor, but not in game or in Game-Mode. Basically the inverse of “hidden in game” this is for a tool

alternatively can I query whether the editor is or is not in Game-Mode or preferably fire an event?

thanks.

Use ‘is visible’ instead of ‘hidden in game’.

2 Likes

in order to use that I need a condition. how to I pipe that condition into my BP?

In construction

That is a conditionless visibility. that will set the visibility to on or off universally.
if you recall from my original post. my condition is state dependent. I’m am not try to arbitrarily set visibility, you may be a bit hung up on the visibility function aspect

I am trying to set visibility based on whether the view port is or is not in Game-mode or whether the game is running.
I want a component to display or not, in the editor ONLY under those conditions. Just like “hidden in game” except inverse.

Ok, then set the component to not visible

image

and

image

This does not work. viewport “Game View” does not fire “Event Begin Play” so visibility cannot be toggled back on that way.

Ah… with you.

Nope, not possible.

You either need to toggle game view with an editor widget, or edit the engine source.

Make an editor tool that will toggle the game view & do your logic. Rebind it to a shortcut to replace G

1 Like

That might take me a bit to figure out. how do I find the “Level Editor Subsystem” object reference. a plugin im missing? The function shows just fine.

You can access it from within the an Editor Utility (widget or normal BP variant).

1 Like

Found it. Its only useable in Editor Utility Blueprints.

Thanks.

Ill update this thread when I’ve made some progress on this.