1.2 - Detecting Network Authority and Remote Clients in Blueprints

An overview of the Network Features example level, example 1.2: Detecting Network Authority and Remote Clients in Blueprints.

Choose your operating system:

Windows

macOS

Linux

On this page

1_2.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 a Blueprint executing different logic depending on whether the Blueprint is running on the Network Authority (Server) or a Remote Machine (Client).

Event Graph

As seen in the Event Graph of the Blueprint below, 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). The Text Render component is then updated based on whether the script is being executed on the Server or Client (the Client also updates the color of the ghost's body to a different material).

Click for full view

Here is the result of what the Server and Client will see by executing this script with the Switch Has Authority node.

1_2_Play.png

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss