From a342c8ddce87ae46a30dffbebb8f87ac364c0a87 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 22 Jul 2024 21:31:52 -0500 Subject: [PATCH 1/5] yupdate Updating version of package and changelog version --- com.unity.netcode.gameobjects/CHANGELOG.md | 2 +- com.unity.netcode.gameobjects/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index b682c86da2..94fe44563e 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). -## [Unreleased] +## [1.10.0] - 2024-07-22 ### Added diff --git a/com.unity.netcode.gameobjects/package.json b/com.unity.netcode.gameobjects/package.json index 1e171cbcf8..47dfd4bcd2 100644 --- a/com.unity.netcode.gameobjects/package.json +++ b/com.unity.netcode.gameobjects/package.json @@ -2,7 +2,7 @@ "name": "com.unity.netcode.gameobjects", "displayName": "Netcode for GameObjects", "description": "Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.", - "version": "1.9.1", + "version": "1.10.0", "unity": "2021.3", "dependencies": { "com.unity.nuget.mono-cecil": "1.10.1", From e09804a2d53549694b9e865ff3b3e9b4ef332842 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Fri, 26 Jul 2024 20:01:30 -0500 Subject: [PATCH 2/5] fix removing the [GenerateSerializationForType(typeof(byte))] attributes. --- .../Runtime/NetworkVariable/AnticipatedNetworkVariable.cs | 1 - .../Runtime/NetworkVariable/NetworkVariable.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/AnticipatedNetworkVariable.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/AnticipatedNetworkVariable.cs index eb8744f6a2..2a08293206 100644 --- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/AnticipatedNetworkVariable.cs +++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/AnticipatedNetworkVariable.cs @@ -51,7 +51,6 @@ public enum StaleDataHandling #pragma warning restore IDE0001 [Serializable] [GenerateSerializationForGenericParameter(0)] - [GenerateSerializationForType(typeof(byte))] public class AnticipatedNetworkVariable : NetworkVariableBase { [SerializeField] diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariable.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariable.cs index 50d30987c6..a17b70333d 100644 --- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariable.cs +++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariable.cs @@ -9,7 +9,6 @@ namespace Unity.Netcode /// the unmanaged type for [Serializable] [GenerateSerializationForGenericParameter(0)] - [GenerateSerializationForType(typeof(byte))] public class NetworkVariable : NetworkVariableBase { /// From e376f651ba3cfbf1c640839f86bc7102540b1824 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Fri, 26 Jul 2024 20:02:01 -0500 Subject: [PATCH 3/5] fix fixing the issue of a missing byte serializer for fixedstrings. --- .../NetworkVariableSerialization.cs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableSerialization.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableSerialization.cs index 1f6d5529ad..0cbcd72e19 100644 --- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableSerialization.cs +++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableSerialization.cs @@ -698,7 +698,7 @@ public unsafe void WriteDelta(FastBufferWriter writer, ref T value, ref T previo { var val = value[i]; var prevVal = previousValue[i]; - if (!NetworkVariableSerialization.AreEqual(ref val, ref prevVal)) + if (val != prevVal) { ++numChanges; changes.Set(i); @@ -722,20 +722,12 @@ public unsafe void WriteDelta(FastBufferWriter writer, ref T value, ref T previo writer.WriteValueSafe(changes); unsafe { - byte* ptr = value.GetUnsafePtr(); - byte* prevPtr = previousValue.GetUnsafePtr(); + byte* ptr = value.GetUnsafePtr(); for (int i = 0; i < value.Length; ++i) { if (changes.IsSet(i)) { - if (i < previousValue.Length) - { - NetworkVariableSerialization.WriteDelta(writer, ref ptr[i], ref prevPtr[i]); - } - else - { - NetworkVariableSerialization.Write(writer, ref ptr[i]); - } + writer.WriteByteSafe(ptr[i]); } } } From 82ce5e2228b1a52dfddb9a6335cbe91142f06215 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Fri, 26 Jul 2024 20:26:50 -0500 Subject: [PATCH 4/5] style removing whitespace --- .../Runtime/NetworkVariable/NetworkVariableSerialization.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableSerialization.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableSerialization.cs index 0cbcd72e19..cda34a57e2 100644 --- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableSerialization.cs +++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableSerialization.cs @@ -722,7 +722,7 @@ public unsafe void WriteDelta(FastBufferWriter writer, ref T value, ref T previo writer.WriteValueSafe(changes); unsafe { - byte* ptr = value.GetUnsafePtr(); + byte* ptr = value.GetUnsafePtr(); for (int i = 0; i < value.Length; ++i) { if (changes.IsSet(i)) From b39bc3a1359535589611eaa70b3ec10423c02d84 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 30 Jul 2024 09:52:22 -0500 Subject: [PATCH 5/5] Update CHANGELOG.md --- com.unity.netcode.gameobjects/CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index a9ddfdba1e..92609a319c 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -5,7 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). - [Unreleased] ### Added @@ -13,7 +12,6 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Changed - ## [1.10.0] - 2024-07-22 ### Added