Unity-Technologies / Unity-Technologies/com.unity.netcode.gameobjects
WriteValuePacked Bug
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 2.3k
- フォーク
- 461
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 20
説明
Description
Hello,I find when use the WriteValuePacked api to pack a float value, it will convert the float to uint.Due to the storage format of the float the convert value will bigger than 1 << 29,which can lead to the result of using 5 bytes to serialize the float,so can you tell me the reason why we convert the float to uint.
Reproduce Steps
Use the test runner to pack the float number.
Actual Outcome
Lead to the result of using 5 bytes to serialize the float.
Expected Outcome
Use less than 4 bytes to serialize the float.
Screenshots
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
WriteValuePacked API から始め、test runner を使って float のケースを再現します。float-to-uint 変換と packed serialization の動作を調査します。現在のバイト数になっている理由を特定し、再現可能なテストで期待されるシリアライズ後のサイズを検証できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100