RealDocs

AActor::IsUsingRegisteredSubObjectList

function Engine Since 5.1
#include "GameFramework/Actor.h"
Access: public Specifiers: const

Description

Returns true if this actor replicates its subobjects and ActorComponents via the registered subobject list rather than via the virtual ReplicateSubobjects() method.

Caveats & Gotchas

  • The registered subobject list approach (introduced in UE 5.1) is the preferred modern pattern. The legacy ReplicateSubobjects() virtual is only called when this returns false — mixing the two approaches on the same actor is not supported.
  • Setting bReplicateUsingRegisteredSubObjectList = true requires that every replicated subobject be explicitly registered with AddReplicatedSubObject(); forgetting to register a subobject means it will silently not replicate.

Signature

bool IsUsingRegisteredSubObjectList() const { return bReplicateUsingRegisteredSubObjectList; }

Return Type

bool

Example

Guard legacy path based on replication mode C++
bool AMyActor::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags)
{
    // Only called when IsUsingRegisteredSubObjectList() == false
    bool bWroteSomething = Super::ReplicateSubobjects(Channel, Bunch, RepFlags);
    bWroteSomething |= Channel->ReplicateSubobject(MySubObject, *Bunch, *RepFlags);
    return bWroteSomething;
}

Version History

Introduced in: 5.1

Version Status Notes
5.6 stable
5.1 stable Introduced alongside the registered subobject list API.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.