RealDocs

AActor::RegisterReplicationFragments

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

Description

Called by the Iris replication system to let the actor register its replication fragments. Override to add custom fragments for Iris-based replication.

Caveats & Gotchas

  • This is an Iris-specific API introduced in UE 5.1. It has no effect when using the legacy replication system (bUseIrisReplication=false).
  • Always call Super::RegisterReplicationFragments() in your override so built-in actor properties continue to replicate.
  • Registering a fragment here does not automatically replicate sub-objects — use AddReplicatedSubObject for those.

Signature

ENGINE_API virtual void RegisterReplicationFragments(UE::Net::FFragmentRegistrationContext& Context, UE::Net::EFragmentRegistrationFlags RegistrationFlags) override

Parameters

Name Type Description Default
Context UE::Net::FFragmentRegistrationContext& Context object used to register replication fragments with the Iris replication system.
RegistrationFlags UE::Net::EFragmentRegistrationFlags Flags controlling how fragments are registered (e.g. whether to include default fragments).

Return Type

void

Example

Registering a custom fragment C++
void AMyActor::RegisterReplicationFragments(UE::Net::FFragmentRegistrationContext& Context, UE::Net::EFragmentRegistrationFlags RegistrationFlags)
{
    Super::RegisterReplicationFragments(Context, RegistrationFlags);
    // Register a custom property fragment
    UE::Net::ReplicateFragment(Context, RegistrationFlags, MyReplicatedStruct, COND_None);
}

Version History

Introduced in: 5.1

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.