{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Set Visibility on a Component in Unreal Engine 5 C++UE Docs

The Set Visibility node maps to USceneComponent::SetVisibility, which shows or hides a component and, with the second argument, can propagate that change to its child components.

Blueprint node & C++ equivalent

C++
MyComponent->SetVisibility(true, /*bPropagateToChildren=*/true);

The C++ equivalent

Call MyComponent->SetVisibility(true, true) to make a component visible and apply the change to its children. The first bool is the new visibility state, and the second, bPropagateToChildren, decides whether attached child components inherit it. Pass false to the second argument to toggle only the component itself.

Set the first argument to false to hide the component.

Visibility versus hidden in game

SetVisibility controls rendering of a single scene component, while AActor::SetActorHiddenInGame hides an entire Actor at once. For collision and ticking, visibility alone does not disable them, so combine it with the relevant collision or tick calls if you need a fully inert component.

Propagation is useful when a parent component owns several visual children that should appear or disappear together.

Frequently asked questions

How do I hide a component in UE5 C++?+

Call Component->SetVisibility(false). Add a second true argument to also hide its child components.

What does bPropagateToChildren do in SetVisibility?+

When true, the visibility change is applied to all child components attached beneath this one, not just the component itself.

Related Components nodes

View all Components nodes →