RealDocs

AActor::SetHidden

function Engine Since unknown
#include "GameFramework/Actor.h"
Access: public

Description

Sets the bHidden flag directly without triggering virtual behavior or component notifications. Exists as a transitional accessor so subclasses do not need direct property access.

Caveats & Gotchas

  • The header explicitly states that SetActorHiddenInGame is preferred in most cases — it respects virtual overrides and propagates visibility changes to all attached components. Use SetHidden only when you specifically need to bypass those side effects.
  • Because this bypasses component notifications, individual components will not update their visibility — the actor may appear visible in-game even after calling SetHidden(true) until something else triggers a component update.
  • This is not replicated automatically — changes made via SetHidden on the server will not propagate to clients unless bHidden is included in the actor's replicated properties, which it is for most actors by default.

Signature

ENGINE_API void SetHidden(const bool bInHidden)

Parameters

Name Type Description Default
bInHidden const bool The new hidden state to assign to the bHidden property.

Return Type

void

Example

Force bHidden without component propagation in a serialization path C++
void AMyActor::RestoreFromSaveData(const FMySaveRecord& Record)
{
    // Restore the raw flag; component visibility will be rebuilt on next tick
    SetHidden(Record.bWasHidden);
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.