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

Is it posible to implement ServerRewind with NetworkTransform?

未關閉
#2,890 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

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

描述

Hello, im currently studying Unity and I started not so long ago using Netcode for GameObjects.

I started following the Unity docs and everything went smoothly until I faced NetworkTransforms, I tried movement with server autority and client autority, witch both worked fine, however I was unable to make a ServerRewind movement method.

I tried having multiple NetworkTransforms with changed autorities (with OnIsServerAuthoritative true and false) and changing them in runtime, needless to say, this didn't work nor changing the OnIsServerAuthoritative method via variable as the method seems to only been called once.

I searched for ways to implement ServerRewind in Netcode for GameObjects but I found zero information about it.

Eventually I managed to do it using 2 NetworkVariables, with write permisions both on server and client and exchanging them values whenever needed (I have an example in my repo if anyone is curious).

I know that ServerRewind is currently on the roadmap, but as it is currently, is there any way for implementing it with NetworkTransforms?

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

先從 NetworkTransform 文件和 ServerRewind 路線圖項目開始,然後將它們的 authority 行為與連結儲存庫中的兩個 NetworkVariable 範例進行比較。判斷執行階段 authority 變更和 rewind 支援是否為預期功能,並記錄受支援的方法或所需 NetworkTransform 變更的範圍。

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

評估

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

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

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