Unity-Technologies / Unity-Technologies/com.unity.netcode.gameobjects
Support cancelling MultiplayerService session joining functions
还没有人认领这个 Issue。
- 主要语言
- 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定任何文件或测试。首先跟踪 MultiplayerService.Instance.CreateOrJoinSessionAsync 和 NetworkManager 的连接流程,以了解需要在哪里传递取消令牌。完成标准是:用户可以通过 MultiplayerService 的函数取消正在进行的会话加入,而无需自行修改该包。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, unity
- 领域
- networking
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100