1.1 - Actor Replication

An overview of the Network Features example level, example 1.1: Actor Replication

Windows
MacOS
Linux
On this page

1_1.png

In order to view both Server and Client perspectives, on the Play dropdown, set the Number of Clients field to 2.

This example demonstrates the use of the Replicates boolean on Actors. When enabled, it allows clients to be aware of Actors spawned on the Server, from a networking perspective.

You can set whether an Actor replicates or not, via the Defaults tab under the Replication section as seen below.

1_1_Replicates.png

Level Blueprint

When entering a play session, two Actors are spawned via the Level Blueprint as seen below.

1_1_LevelBlueprint.png

The Switch Has Authority node is used to check if the script is being executed on a machine that has Network Authority (in most use cases, this would mean Server) or if its being executed on a remote machine (in most use cases, this would be the Client).

For this example, it is only being executed on the Server where one of the two Actors spawned is set to Replicate while the other is not. As seen in the image below, the Server can see both Actors while the Client can only see the one that is set to Replicate.

1_1_Play.png

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback