---
title: "owner(of:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/synchronizationservice/owner(of:)"
---

# owner(of:)

Gets the device that owns a given entity, if any.

## Declaration

```swift
@MainActor @preconcurrency func owner(of entity: Entity) -> (any SynchronizationPeerID)?
```

## Parameters

- `entity`: The entity for which you want the owner.

## Return Value

Return Value The networked device that owns the entity. The value is nil if the entity isn’t synchronized or is owned locally.

## See Also

### Managing ownership

- [giveOwnership(of:toPeer:)](realitykit/synchronizationservice/giveownership(of:topeer:).md)
