RealDocs

AActor::SetActorHiddenInGame

function Engine Blueprint Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: virtualUFUNCTIONBlueprintCallable

Description

Hides or shows the actor and all of its components in the game world. Does not affect collision or tick — a hidden actor still receives ticks and collides normally unless you also disable those.

Caveats & Gotchas

  • Hidden actors still tick and collide. If you want to fully deactivate an actor, also call SetActorEnableCollision(false) and SetActorTickEnabled(false).
  • This sets bHidden on the actor. Individual components can override visibility independently via USceneComponent::SetVisibility.
  • Does not affect visibility in the editor viewport — use SetIsTemporarilyHiddenInEditor for that.

Signature

virtual void SetActorHiddenInGame(bool bNewHidden)

Parameters

Name Type Description Default
bNewHidden bool Whether to hide the actor and all its components.

Return Type

void

Examples

Hide this actor and disable its collision on BeginPlay Blueprint
Event BeginPlay Set Actor Hidden In Game Target is Actor Target New Hidden true Set Actor Enable Collision Target is Actor Target New Actor Enable Collision New Actor Enable Collision false false
Edit Blueprint graph Hide this actor and disable its collision on BeginPlay
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Hide and disable an actor C++
// Hide visually and disable collision, but keep ticking
SetActorHiddenInGame(true);
SetActorEnableCollision(false);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.