Controlling the connection of an Actor
Now that you have created a fully working character, it’s time to understand how a connection is handled inside Unreal Engine (to quickly refresh your understanding of how connections work, you can refer back to Chapter 2, Understanding Networking Basics).
Each connection has its own PlayerController
that has been created expressly for it; in this case, we say that the PlayerController
is “owned” by that connection.
In Unreal Engine, Actors can have an Owner: if the outermost Owner of an Actor is a PlayerController
, then the PlayerController
becomes the Owner of that Actor. This means that the first Actor is also owned by the same connection that owns the PlayerController
.
The concept of ownership is used during Actor replication to determine which connections receive updates for each Actor: for instance, an Actor may be flagged so that only the connection that owns that Actor will be sent property updates for it...