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

Allow configuring NetworkTransform through a ScriptableObject

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

還沒有人認領這個 Issue。

Tracking type:feature-2.x
主要語言
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.

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

首先檢查 NetworkTransform 元件及其序列化的 Inspector 屬性,尤其是同步軸、閾值、插值、四元數同步、壓縮和 half-float 精度。確定如何指派 ScriptableObject 設定而不破壞現有工作流程,然後驗證是否可以將設定建立為資產並套用至多個 NetworkTransforms。

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

評估

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

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

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