ue-actor-component-arc…
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing multiplayer C++: replicating a property, choosing an RPC type, tuning relevancy or dormancy, registering replicated subobjects, or turning on push model or Iris. Also use when the user mentions 'replicate a variable', 'OnRep', 'DOREPLIFETIME',
Claude Code
$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-networking-replication --agent claude-code
Codex
$ npx skills add quodsoler/unreal-engine-skills --skill ue-networking-replication -a codex -y
Cursor
$ npx skills add quodsoler/unreal-engine-skills --skill ue-networking-replication -a cursor -y
Gemini CLI
$ npx skills add quodsoler/unreal-engine-skills --skill ue-networking-replication -a gemini-cli -y
GitHub Copilot
$ npx skills add quodsoler/unreal-engine-skills --skill ue-networking-replication -a github-copilot -y
OpenCode
$ npx skills add quodsoler/unreal-engine-skills --skill ue-networking-replication -a opencode -y
Windsurf
$ npx skills add quodsoler/unreal-engine-skills --skill ue-networking-replication -a windsurf -y
name: ue-networking-replication description: "Use when writing multiplayer C++: replicating a property, choosing an RPC type, tuning relevancy or dormancy, registering replicated subobjects, or turning on push model or Iris. Also use when the user mentions 'replicate a variable', 'OnRep', 'DOREPLIFETIME', 'GetLifetimeReplicatedProps', 'Server RPC', 'NetMulticast', 'WithValidation', 'COND_OwnerOnly', 'HasAuthority', 'ENetRole', 'FFastArraySerializer', 'MARK_PROPERTY_DIRTY_FROM_NAME', 'net dormancy', 'replication graph', 'dedicated server' or 'listen server'. For GAS prediction and attribute replication, see ue-gameplay-abilities; for movement replication and CMC prediction, see ue-character-movement." metadata: version: "2.0.0" engine: "5.8"
Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".
Server-authoritative replication for actors, components and subobjects. Core APIs live in the `Engine` module (`GameFramework/Actor.h`, `Engine/NetDriver.h`, `Net/UnrealNetwork.h`) and the `NetCore` module (`Net/Core/PushModel/PushModel.h`, `Net/Serialization/FastArraySerializer.h`). `ELifetimeCondition` and `REPNOTIFY_*` come from `CoreUObject` (`UObject/CoreNetTypes.h`). Optional systems: the Iris replication system (`IrisCore` module, `SetupIrisSupport(Target)` in Build.cs) and the ReplicationGraph plugin (Beta in 5.8, Build.cs module `ReplicationGraph`).
Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.
Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.
| Request is about… | Go to | |---|---| | Authority checks, roles, dedicated vs listen server | [Net Roles, Net Modes and Authority](#net-roles-net-modes-and-authority) | | Replicating a variable, `OnRep_`, `GetLifetimeReplicatedProps` | [Property Replication](#property-replication) | | Who receives a property (`COND_*`) | [Lifetime Conditions](#lifetime-conditions) | | Cutting per-frame comparison cost | [Push Model](#push-model) | | Replicated arrays / inventories | [Fast Array Serialization](#fast-array-serialization) | | Server/Client/Multicast calls, validation | [Remote Procedure Calls](#remote-procedure-calls) | | `SetOwner`, relevancy, culling, dormancy | [Ownership, Relevancy and Dormancy](#ownership-relevancy-and-dormancy) | | Replicating `UObject`s owned by an actor or component | [Subobject Replication](#subobject-replication) | | Simulated bodies, physics prediction | [Physics Replication](#physics-replication) | | Iris, `net.Iris.UseIrisReplication` | [Iris Replication System](#iris-replication-system) | | 50+ connections, spatial relevancy | [Replication Graph](#replication-graph) | | `UNetDriver`, `UNetConnection`, disconnect detection | [Net Driver and Connections](#net-driver-and-connections) |
Worked end-to-end examples: [replication patterns](references/replication-patterns.md). RPC selection tables and verbatim engine RPC declarations: [RPC decision guide](references/rpc-decision-guide.md).
`ENetRole` is declared in `Engine/Classes/Engine/EngineTypes.h`; the accessors are on `AActor`.
ROLE_None // not replicated ROLE_SimulatedProxy // remote copy driven by replicated state ROLE_AutonomousProxy // remote copy of the locally controlled pawn/controller ROLE_Authority // owns and may mutate this actor
From `GameFramework/Actor.h`:
ENetRole GetLocalRole() const; ENetRole GetRemoteRole() const; bool HasAuthority() const; ENetMode GetNetMode() const; bool IsNetMode(ENetMode Mode) const;
`ENetMode` (`Engine/Classes/Engine/EngineBaseTypes.h`): `NM_Standalone`, `NM_DedicatedServer`, `NM_ListenServer`, `NM_Client`. Every mode below `NM_Client` is a server.
| Machine | `GetLocalRole()` | `GetRemoteRole()` | |---|---|---| | Server | `ROLE_Authority` | `ROLE_AutonomousProxy` or `ROLE_SimulatedProxy` | | Owning client | `ROLE_AutonomousProxy` | `ROLE_Authority` | | Other clients | `ROLE_SimulatedProxy` | `ROLE_Authority` |
On a listen server the host is `ROLE_Authority` *and* locally controlled: use `APawn::IsLocallyControlled()` to skip host-only or client-only paths.
// MyReplicatedActor.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyReplicatedActor.generated.h"
UCLASS()
class MYGAME_API AMyReplicatedActor : public AActor
{
GENERATED_BODY()
public:
AMyReplicatedActor();
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
protected:
UPROPERTY(ReplicatedUsing = OnRep_Health)
float Health = 100.f;
UPROPERTY(Replicated)
int32 TeamId = 0;
UFUNCTION()
void OnRep_Health(float PreviousHealth);
};// MyReplicatedActor.cpp
#include "MyReplicatedActor.h"
#include "Net/UnrealNetwork.h"
AMyReplicatedActor::AMyReplicatedActor()
{
bReplicates = true; // or SetReplicates(true) at runtime
SetReplicateMovement(true);
SetNetUpdateFrequency(10.f); // replication considerations per second
SetMinNetUpdateFrequency(2.f); // throttled floor when nothing changes
SetNetCullDistanceSquared(225000000.f); // 150 m squared
NetPriority = 1.f; // still a public field in 5.8
}
void AMyReplicatedActor::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps); // never omit
DOREPLIFETIME(AMyReplicatedActor, Health);
DOREPLIFETIME_CONDITION(AMyReplicatedActor, TeamId, COND_InitialOnly);
}
void AMyReplicatedActor::OnRep_Health(float PreviousHealth)
{
// Clients only. Must be idempotent: relevancy changes re-fire it.
}Rules:
A collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing Unreal Engine C++ AI — AI controllers, behavior tree nodes, blackboards, AI perception, navmesh pathfinding, EQS…
Use when writing or debugging Unreal Engine animation C++: AnimInstance subclasses, thread-safe update, FAnimInstanceProxy,…
Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers…
Use when playing, mixing or debugging sound in Unreal Engine — one-shot SFX, looping ambience, music, dialogue or procedural…
Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure,…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…