Unity-Technologies / Unity-Technologies/com.unity.netcode.gameobjects
WriteValuePacked Bug
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- C#
- Estrelas
- 2.3k
- Forks
- 461
- Merge médio
- 3d 16h
- PRs com merge (30d)
- 20
Descrição
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
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece pela API WriteValuePacked e reproduza o caso de float usando o test runner. Inspecione a conversão de float para uint e o comportamento de packed serialization; considera-se concluído quando o motivo da contagem atual de bytes estiver estabelecido e um teste reproduzível verificar o tamanho serializado esperado.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp
- Domínio
- networking
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 35/100