Replication Graph in Unreal Engine
source: https://dev.epicgames.com/documentation/en-us/unreal-engine/replication-graph-in-unreal-engine?application_version=5.8 version: Unreal Engine 5.8 Documentation fetched: 2026-10-11(curl 抓取页面文本,去掉 HTML;原文全文,供 wiki 页面引用)
Replication Graph in Unreal Engine | Unreal Engine 5.8 Documentation | Epic Developer Community Table of Contents Developer Replication Graph Replication Graph Overview of the Replication Graph feature and Replication Graph Nodes.
On this page The Replication Graph Plugin is a system for network replication in multiplayer games that is designed to scale well with large numbers of players and replicated Actors.
As an example, Epic's own Fortnite Battle Royale starts each game with 100 connected players and about 50,000 replicated Actors.
The standard network replication strategy, which is to require each replicated Actor to determine whether or not it should send an update to each connected client, performs poorly in cases like this and will bottleneck the server's CPU.
Solutions like dividing Actors into staggered groups, or simply updating less frequently, might mitigate the issue, but will also degrade the client experience by decreasing update frequency.
The Replication Graph eliminates the need for Actors to evaluate each connected client individually, solving the CPU performance issue without sacrificing the client experience.
Structure The Replication Graph contains a series of Replication Graph Nodes , which are responsible for building lists of Actors to replicate to each client on demand.
Because this system is built from persistent objects, as opposed to merely being function calls processed by the replicated Actors themselves, data can be stored across multiple frames and shared between client connections.
This persistent, shared data is what enables the Replication Graph system to decrease the time it takes to produce replication lists for each client.
Replication Graph Nodes (we'll call them "nodes" for short) do the actual work of establishing which Actors potentially require updates, sorting them into groups, storing precomputed lists to send to clients, and so on.
Their ultimate task is to provide "replication lists" of Actors on demand to each client connection as quickly as possible, so that the server spends as few CPU cycles as possible per Actor, per client.
Each node can function in a unique way, and developers are encouraged to write custom nodes for their own games as needed.
Nodes may be game-agnostic, or may leverage game-specific information.
Putting Actors into different nodes based on their roles in your game can give you better control over how and when they replicate.
Building new nodes and using the Replication Graph to assign Actors to the best nodes possible based on how they behave in your game will provide the greatest decreases in server CPU time spent on preparing network replication lists.
Enabling The System You can configure your project to use a custom Replication Driver (the parent class of Replication Graph) in one of two ways: Specifying a Replication Driver class in the "DefaultEngine.ini" file.
Binding a function that returns an instance of your Replication Driver class to the default Replication Driver's creation Delegate.
The ShooterGame project is a good example of how to set up and implement a Replication Graph.
However, note that Replication Graph is disabled on console builds because it does not currently work in splitscreen games.
Configuration (.ini) Files To configure the Engine's default Replication Driver, open the "DefaultEngine.ini" file for your project.
Find (or add) the [/Script/OnlineSubsystemUtils.IpNetDriver] section and set (or add) the "ReplicationDriverClassName" entry so that it indicates the name of the Replication Driver (or Replication Graph) class you wish to use.
This should look roughly as follows, substituting "ProjectName" with your actual project's name, and "ClassName" with your custom class name: [/Script/OnlineSubsystemUtils.IpNetDriver] ReplicationDriverClassName="/Script/ProjectName.ClassName" Copy full snippet [/Script/OnlineSubsystemUtils.IpNetDriver] ReplicationDriverClassName="/Script/ProjectName.ClassName" Binding In Code If your project has multiple game modes or maps that have vastly different networking requirements, binding to a Delegate will enable you to create the appropriate Replication Driver for the current game mode or map in code.
To use this method, bind a function to the UReplicationDriver function called CreateReplicationDriverDelegate .
Your bound function must return a valid instance of your desired Replication Driver class, as this sample lambda function does: UReplicationDriver::CreateReplicationDriverDelegate().BindLambda([](UNetDriver* ForNetDriver, const FURL& URL, UWorld* World) -> UReplicationDriver* { return NewObject