AActor::SetActorHiddenInGame
#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.
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 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.
Example
Hide and disable an actor C++
// Hide visually and disable collision, but keep ticking
SetActorHiddenInGame(true);
SetActorEnableCollision(false); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?