Unity-Technologies / Unity-Technologies/com.unity.netcode.gameobjects

Support cancelling MultiplayerService session joining functions

未關閉
#3,655 6 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

stat:imported type:feature
主要語言
C#
星號
2.3k
分支
461
平均合併
3 天 16 小時
30 天內合併 PR
20

描述

Is your feature request related to a problem? Please describe.
It takes several seconds to join a session through MultiplayerService. I'd like to let users cancel a connection attempt during the connection process.

Describe the solution you'd like
I'd like to pass cancellation tokens to functions like MultiplayerService.Instance.CreateOrJoinSessionAsync.

Describe alternatives you've considered
I've tried preventing the NetworkManager from connecting to a session if my own connection function wrapping MultiplayerService.Instance.CreateOrJoinSessionAsync is cancelled, but I cannot find a clean way to do this. I have also considered modifying the Unity.Services.Multiplayer package myself, but I would rather not do this.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

未指定任何檔案或測試。首先追蹤 MultiplayerService.Instance.CreateOrJoinSessionAsync 和 NetworkManager 的連線流程,以了解需要在哪些地方傳遞取消權杖。完成標準是:使用者可以透過 MultiplayerService 的函式取消進行中的工作階段加入,而不必自行修改套件。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp, unity
領域
networking
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。