# InvalidOperationException: NetworkTransform: Object with NetworkId 42 already has an owner. Cannot assign new owner.

- **ID:** `unity/network-transform-ownership-conflict`
- **Domain:** unity
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Attempting to assign ownership of a networked object that is already owned by another client or has not been properly released.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Netcode for GameObjects 1.6.0 | active | — | — |
| 1.7.0-pre.1 | active | — | — |

## Workarounds

1. **Use `if (networkObject.IsOwner) networkObject.RemoveOwnership();` then wait one frame before assigning new owner using a coroutine.** (85% success)
   ```
   Use `if (networkObject.IsOwner) networkObject.RemoveOwnership();` then wait one frame before assigning new owner using a coroutine.
   ```
2. **Before assigning, check `networkObject.NetworkManager.IsServer` and only allow server to change ownership via `networkObject.ChangeOwnership(clientId)`.** (90% success)
   ```
   Before assigning, check `networkObject.NetworkManager.IsServer` and only allow server to change ownership via `networkObject.ChangeOwnership(clientId)`.
   ```
3. **Implement a custom ownership queue on the server: when a client requests ownership, the server releases the current owner first, then assigns.** (78% success)
   ```
   Implement a custom ownership queue on the server: when a client requests ownership, the server releases the current owner first, then assigns.
   ```

## Dead Ends

- **** — RemoveOwnership() is asynchronous; ownership may not be released by the time the new assignment is attempted. (60% fail)
- **** — Spawning a new object avoids the conflict but causes resource bloat and breaks game logic expecting a single instance. (25% fail)
- **** — This hides the object from all clients, which may prevent the ownership error but breaks visibility requirements. (70% fail)
