Skip to content

Network Replication Legacy

For Pro 2.5 or below and Lite 1.3 or below. For the current version see the Networking Guide.


Network replication can be configured for state machine actor components. On initial replication state machines replicate their current states. Afterward they are kept in sync by replicating transitions.

Video

Configuration

On the component Component Replicates must be checked for replication to work.

Under the Network category of components you can configure the replication settings. See USMStateMachineComponent#Networking for more detailed information.

Network Tick Configuration

Configure which domain you want the state machine to tick in. For accurate time tracking and executing state updates ticking needs to be enabled.

Network Transition Configuration

Configure where transitions are evaluated. Transitions determine when a state exits, so whoever evaluates the transition will determine the state of the state machine. It is recommended to either use Client or Server with transitions, and not Client and Server otherwise the client and server may conflict on when a state should transition or not.

  • If the server performs this it will then replicate to all clients.
  • If a client performs this it will then inform the server which will replicate down to all clients.
  • On Transition Entered logic is determined by a separate setting Network Transition Entered Configuration. In older versions this executed across all domains automatically.
  • All other optional transition execution nodes will always execute on both the client and server, regardless of the domain configuration.

Network State Configuration

Where general state logic will execute. This includes On Begin, On Update, and On End.

Include Simulated Proxies

Include simulated proxies instead of just autonomous proxies when processing the client domain. This can also allow actors not possessed by a player controller to execute state logic.

Take Transitions from Server Only

If a client evaluates that a transition can be taken it will always inform the server. By default it will then take the transition immediately and disregard the server update when it receives it. If this option is checked the client will instead wait for the server's update to take the transition. One benefit to this is if you need to read accurate server time in the client.

Calculate Server Time for Clients

Calculate the server time spent in states when NetworkTickConfiguration is set to client only. This only impacts the client value of GetServerTimeInState and has no effect if the server is ticking.

When true and the server is not ticking, it will take a measurement from the timestamp of when the state first started compared to when the server received the request to end the state.

If only using auto-bound events, or the state machine is being manually updated, this may not be necessary and disabling could increase accuracy.

Replicate States on Load

When a state machine initializes it will replicate the current state from the server. If this is unchecked then it will use the initial state.

Discard Transitions Before Initialize

In the event a transition replicates before the instance is initialized it will queue the transition and execute it after. If this setting is true it will instead discard it.

Max Time To Wait for Transition

Once a client sends a notice a transition can be taken it will wait up to this time for the server response before re-evaluating transitions and notifying the server again.

Manually Determining Client or Server Domains

If using Client and Server you may want to check in the graph which domain you are running under. The best way to do this is use methods Unreal Engine provides, such as HasAuthority. This requires an actor to do this. If your context is an actor you could read information from there.