Unity-Technologies / Unity-Technologies/com.unity.netcode.gameobjects
Allow configuring NetworkTransform through a ScriptableObject
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 2.3k
- 派生
- 461
- 平均合并
- 3 天 16 小时
- 30 天内合并 PR
- 20
描述
Whenever I create a new thing requiring the synchronization of a transform, I add a NetworkTransform component to it, and have to configure the properties of it again and again to the same exact values I have found to work for my use cases. This becomes increasingly bothersome as the complexity of the project increases. And if you then want to modify something later you have to go through everything manually and change the properties. (Yes I know, prefab variants, but those are only viable in very specific situations)
I would propose moving most of the properties on the NetworkTransform to a ScriptableObject saved to the assets folder, so you could configure those options in a more cohorent way. You could create different configs for fast moving objects, big slow objects, etc. and assign them to different NetworkTransforms easily.
The properties I often myself copy pasting which would be good candidates to live on ScriptableObjects are:
- Axis to synchronize
- Thresholds
- Interpolation settings (these are the most painful to reconfigure every time)
- Quaternion sync, compression, half float precision
This could be an additional feature accessible through the NetworkTransform through a boolean toggle in the inspector, to not break existing workflows.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 NetworkTransform 组件及其序列化的 Inspector 属性,尤其是同步轴、阈值、插值、四元数同步、压缩和 half-float 精度。确定如何分配 ScriptableObject 配置而不破坏现有工作流,然后验证是否可以将配置创建为资源并应用于多个 NetworkTransforms。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, unity
- 领域
- game-dev, networking
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100