{
  "id": "unity/network-transform-ownership-conflict",
  "signature": "InvalidOperationException: NetworkTransform: Object with NetworkId 42 already has an owner. Cannot assign new owner.",
  "signature_zh": "InvalidOperationException：NetworkTransform：NetworkId 为 42 的对象已有所有者。无法分配新所有者。",
  "regex": "InvalidOperationException: NetworkTransform: Object with NetworkId \\d+ already has an owner",
  "domain": "unity",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Attempting to assign ownership of a networked object that is already owned by another client or has not been properly released.",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试分配已由其他客户端拥有或未正确释放的网络化对象的所有权。",
  "versions": [
    {
      "version": "Netcode for GameObjects 1.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.7.0-pre.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "RemoveOwnership() is asynchronous; ownership may not be released by the time the new assignment is attempted.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Spawning a new object avoids the conflict but causes resource bloat and breaks game logic expecting a single instance.",
      "fail_rate": 0.25,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This hides the object from all clients, which may prevent the ownership error but breaks visibility requirements.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use `if (networkObject.IsOwner) networkObject.RemoveOwnership();` then wait one frame before assigning new owner using a coroutine.",
      "success_rate": 0.85,
      "how": "Use `if (networkObject.IsOwner) networkObject.RemoveOwnership();` then wait one frame before assigning new owner using a coroutine.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Before assigning, check `networkObject.NetworkManager.IsServer` and only allow server to change ownership via `networkObject.ChangeOwnership(clientId)`.",
      "success_rate": 0.9,
      "how": "Before assigning, check `networkObject.NetworkManager.IsServer` and only allow server to change ownership via `networkObject.ChangeOwnership(clientId)`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement a custom ownership queue on the server: when a client requests ownership, the server releases the current owner first, then assigns.",
      "success_rate": 0.78,
      "how": "Implement a custom ownership queue on the server: when a client requests ownership, the server releases the current owner first, then assigns.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Use `if (networkObject.IsOwner) networkObject.RemoveOwnership();` then wait one frame before assigning new owner using a coroutine.",
    "Before assigning, check `networkObject.NetworkManager.IsServer` and only allow server to change ownership via `networkObject.ChangeOwnership(clientId)`.",
    "Implement a custom ownership queue on the server: when a client requests ownership, the server releases the current owner first, then assigns."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs-multiplayer.unity3d.com/netcode/current/basics/networkobject/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-06-02",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}