# Actor Owner and Owning Connection

Actor owner, owning connection, and what this tells you about an actor in networked gameplay.

There are many different types of parent-child relationships for objects in Unreal Engine. Two important relationships for network replication in Unreal Engine are an actor’s owner and the owner’s associated owning connection.

## Overview

Multiplayer in Unreal Engine uses a server-authoritative, client-server model. In this model, clients connect to a centralized server. When a client connects to the server, a player controller is created on the server associated with the connected client (a connected client is referred to as a connection). When the client begins play on the server, this player controller possesses a pawn that the client controls in the game. The player controller is the owner of the pawn. The owning connection of an actor is the connection associated with the actor’s owning player controller. The owner and owning connection determine which connected client has the authority to make changes and call remote functions.

Every `AActor`-derived object stores a pointer to its owner. Not every `AActor`-derived object has an owner. The actor's owner may be null, in which case the actor has no owner.

### Uses of Owning Connection

Connection ownership is important for:

- Actor replication
- Property replication
- RPCs

An actor’s owning connection is used during actor replication to determine which connections get updates for an actor, known as actor relevancy. For actors that have `bOnlyRelevantToOwner` set to true, only the connection that owns the actor receives property updates for the actor. By default, all player controllers are only relevant to their owner. This is why each client only receives updates for their own player controllers.

An actor’s owning connection is used during property replication involving conditions that use the owner. For more information about how an actor’s owner can affect property replication, see Conditional Replication.

An actor’s owning connection is also important for RPCs. When the server calls a client RPC function on an actor, unless the RPC is marked as `NetMulticast`, the RPC needs to know which connections to execute the RPC on. The actor’s owning connection determines the connections to send and execute the RPC.

## Determine Owner and Owning Connection

Figure 1. Clients connected to a central server showing pawns, owning player controllers, and owning connections.

Suppose you are playing a multiplayer game as a client connected to the server. Your player controller on your machine is the abstraction of you as a player. In the context of Figure 1, if you are playing on Client 1, your input is processed in Player Controller 1 and communicated to Pawn 1. As previously mentioned, when your client machine connects to the server, Net Connection 1 is established, and Player Controller S1 is created on the server associated with your connection. The server pawn actor, Pawn S1, is possessed by Player Controller S1. This means that Player Controller S1 owns Pawn S1. The owning connection of Pawn S1 is Net Connection 1, which is the owning connection for Player Controller S1. Pawn S1 is only owned by this connection during the time it is also owned/possessed by Player Controller S1. As soon as Player Controller S1 no longer possesses Pawn S1, Net Connection 1 is no longer the owning connection for Pawn S1.

The same logic applies to inventory items that may belong to your in-game character pawn. Inventory items are owned by the same connection that might own the pawn.

Actor components operate in a similar fashion to determine ownership but with some additional steps. For actor components, you must first determine the component’s owner by walking the actor component’s outer chain until the owning actor is found. You can follow the process outlined above to determine the owning connection for the actor component’s owning actor.

### Owner

To determine the owner of an actor, you query for an actor’s outermost owner. If the outermost owner is a player controller, then the original actor’s owning connection is the same as the player controller’s owning connection.

To obtain an actor’s owner, call `AActor::GetOwner`.

To obtain an actor component’s owning actor, call `UActorComponent::GetOwner`.

### Owning Connection

To obtain an actor’s owning connection, call `AActor::GetNetConnection`.

- programming
- networking
- properties
- owner
- owning connection

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library

On this page

- Overview
- Uses of Owning Connection
- Determine Owner and Owning Connection
- Owner
- Owning Connection

Related documents
Detailed Actor Replication Flow

## Privacy Preference Center

### Your Privacy

When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer. More information

- ### Strictly Necessary Cookies

  Always Active
  Strictly Necessary Cookies

  These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.

  Cookies Details‎

- ### Performance Cookies

  Performance Cookies

  These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

  Cookies Details‎

- ### Functional Cookies

  Functional Cookies

  These cookies enable the website to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.

  Cookies Details‎

Consent Leg.Interest
Select All Vendors
Select All Vendors
Select All Hosts

Select All

- REPLACE-WITH-DYANMIC-HOST-ID

  ### 33Across

  View Third Party Cookies
  - Name
    cookie name

- REPLACE-WITH-DYANMIC-VENDOR-ID

  ### 33Across

  3 Purposes

  View Privacy Notice

  ### 33Across

  3 Purposes

  View Privacy Notice
  REPLACE-WITH-DYANMIC-VENDOR-ID

  Consent Purposes

  Location Based Ads

  Consent Allowed

  Legitimate Interest Purposes

  Personalize

  Require Opt-Out

  Special Purposes

  Location Based Ads

  Features

  Location Based Ads

  Special Features

  Location Based Ads

Clear Filters

Information storage and access

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and personalize content.Privacy Policy