From 721041590a05e7998cea26bda06e14c8dbe1772e Mon Sep 17 00:00:00 2001 From: Noellie Velez Date: Mon, 2 Mar 2026 11:19:02 +0100 Subject: [PATCH 1/9] Add Serializable and NonSerialized attributes --- com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs | 1 + .../Runtime/NetworkVariable/NetworkVariableBase.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs b/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs index c0633da1f4..5c669b396d 100644 --- a/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs @@ -951,6 +951,7 @@ public NetworkPrefabHandler PrefabHandler /// /// #pragma warning restore IDE0001 + [System.NonSerialized] public RpcTarget RpcTarget; /// diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs index 0c3532208a..0baec21a2d 100644 --- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs +++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs @@ -25,6 +25,7 @@ public struct NetworkVariableUpdateTraits /// /// Interface for network value containers /// + [Serializable] public abstract class NetworkVariableBase : IDisposable { [SerializeField] From 71ba8413966b63a1abcda39bd4ea7c743488df80 Mon Sep 17 00:00:00 2001 From: Noellie Velez Date: Mon, 2 Mar 2026 11:33:43 +0100 Subject: [PATCH 2/9] Fixing code formatting --- com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs b/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs index 5c669b396d..67acb6b7a8 100644 --- a/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs @@ -951,7 +951,7 @@ public NetworkPrefabHandler PrefabHandler /// /// #pragma warning restore IDE0001 - [System.NonSerialized] + [NonSerialized] public RpcTarget RpcTarget; /// From 56bf0bf21605980d4d82b289f5799fcf83e8ffe6 Mon Sep 17 00:00:00 2001 From: Noellie Velez Date: Mon, 2 Mar 2026 14:03:09 +0100 Subject: [PATCH 3/9] Add Serializable attribute --- .../Runtime/NetworkVariable/NetworkVariableBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs index 0baec21a2d..25abeb20e9 100644 --- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs +++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs @@ -7,6 +7,7 @@ namespace Unity.Netcode /// /// Defines update timing constraints for NetworkVariables /// + [Serializable] public struct NetworkVariableUpdateTraits { /// From f10b0c312b2b1e3a35600817ed51210390b4812c Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 2 Mar 2026 10:01:30 -0600 Subject: [PATCH 4/9] fix Marking all of the fields that Roslyn is complaining about as internal. --- .../NetworkVariableTestComponent.cs | 50 +++++++++---------- .../DistributedAuthorityCodecTests.cs | 2 +- .../Tests/Runtime/HiddenVariableTests.cs | 2 +- .../Tests/Runtime/ListChangedTest.cs | 2 +- .../NetworkObjectSynchronizationTests.cs | 4 +- .../Tests/Runtime/NetworkShowHideTests.cs | 4 +- .../NetworkTransform/NetworkTransformBase.cs | 2 +- .../Tests/Runtime/NetworkUpdateLoopTests.cs | 4 +- .../NetworkVarBufferCopyTest.cs | 2 +- .../NetworkVariableCollectionsTests.cs | 14 +++--- .../NetworkVariableTestsHelperTypes.cs | 10 ++-- .../NetworkVariable/OwnerModifiedTests.cs | 2 +- .../NetworkVariable/OwnerPermissionTests.cs | 4 +- .../Profiling/NetworkVariableNameTests.cs | 2 +- .../Tests/Runtime/Rpc/UniversalRpcTests.cs | 2 +- 15 files changed, 53 insertions(+), 53 deletions(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs index 3e77d9762b..465b096b15 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs @@ -208,31 +208,31 @@ internal class NetworkVariableTestComponent : NetworkBehaviour private NetworkVariable m_NetworkVariableManaged = new NetworkVariable(); - public NetworkVariableHelper Bool_Var; - public NetworkVariableHelper Byte_Var; - public NetworkVariableHelper Color_Var; - public NetworkVariableHelper Color32_Var; - public NetworkVariableHelper Double_Var; - public NetworkVariableHelper Float_Var; - public NetworkVariableHelper Int_Var; - public NetworkVariableHelper Long_Var; - public NetworkVariableHelper Sbyte_Var; - public NetworkVariableHelper Quaternion_Var; - public NetworkVariableHelper Pose_Var; - public NetworkVariableHelper Short_Var; - public NetworkVariableHelper Vector4_Var; - public NetworkVariableHelper Vector3_Var; - public NetworkVariableHelper Vector2_Var; - public NetworkVariableHelper Ray_Var; - public NetworkVariableHelper Ulong_Var; - public NetworkVariableHelper Uint_Var; - public NetworkVariableHelper Ushort_Var; - public NetworkVariableHelper FixedString32_Var; - public NetworkVariableHelper FixedString64_Var; - public NetworkVariableHelper FixedString128_Var; - public NetworkVariableHelper FixedString512_Var; - public NetworkVariableHelper FixedString4096_Var; - public NetworkVariableHelper Managed_Var; + internal NetworkVariableHelper Bool_Var; + internal NetworkVariableHelper Byte_Var; + internal NetworkVariableHelper Color_Var; + internal NetworkVariableHelper Color32_Var; + internal NetworkVariableHelper Double_Var; + internal NetworkVariableHelper Float_Var; + internal NetworkVariableHelper Int_Var; + internal NetworkVariableHelper Long_Var; + internal NetworkVariableHelper Sbyte_Var; + internal NetworkVariableHelper Quaternion_Var; + internal NetworkVariableHelper Pose_Var; + internal NetworkVariableHelper Short_Var; + internal NetworkVariableHelper Vector4_Var; + internal NetworkVariableHelper Vector3_Var; + internal NetworkVariableHelper Vector2_Var; + internal NetworkVariableHelper Ray_Var; + internal NetworkVariableHelper Ulong_Var; + internal NetworkVariableHelper Uint_Var; + internal NetworkVariableHelper Ushort_Var; + internal NetworkVariableHelper FixedString32_Var; + internal NetworkVariableHelper FixedString64_Var; + internal NetworkVariableHelper FixedString128_Var; + internal NetworkVariableHelper FixedString512_Var; + internal NetworkVariableHelper FixedString4096_Var; + internal NetworkVariableHelper Managed_Var; public bool EnableTesting; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs index b6157324bc..6d6c7c617e 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs @@ -74,7 +74,7 @@ private static ushort GetPortToBind() internal class TestNetworkComponent : NetworkBehaviour { - public NetworkList MyNetworkList = new NetworkList(new List { 1, 2, 3 }); + internal NetworkList MyNetworkList = new NetworkList(new List { 1, 2, 3 }); public NetworkVariable MyNetworkVar = new NetworkVariable(3); [Rpc(SendTo.Authority)] diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/HiddenVariableTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/HiddenVariableTests.cs index 94b44cf230..f477c332eb 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/HiddenVariableTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/HiddenVariableTests.cs @@ -16,7 +16,7 @@ internal class HiddenVariableObject : NetworkBehaviour public static List ClientInstancesSpawned = new List(); public NetworkVariable MyNetworkVariable = new NetworkVariable(); - public NetworkList MyNetworkList = new NetworkList(); + internal NetworkList MyNetworkList = new NetworkList(); public static Dictionary ValueOnClient = new Dictionary(); public static int ExpectedSize = 0; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/ListChangedTest.cs b/com.unity.netcode.gameobjects/Tests/Runtime/ListChangedTest.cs index 3b646ea00f..2b92e76305 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/ListChangedTest.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/ListChangedTest.cs @@ -17,7 +17,7 @@ internal class ListChangedObject : NetworkBehaviour public int ExpectedValue = 0; public bool AddDone = false; - public NetworkList MyNetworkList = new NetworkList(); + internal NetworkList MyNetworkList = new NetworkList(); public override void OnNetworkSpawn() { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs index 2ca041fa7e..50b1ed50fd 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs @@ -399,7 +399,7 @@ public static void ResetSpawnCount() private const uint k_MaxDataBlocks = 64; // Add various types of NetworkVariables - public NetworkList NetworkVariableData1; + internal NetworkList NetworkVariableData1; public NetworkVariable NetworkVariableData2; public NetworkVariable NetworkVariableData3; public NetworkVariable NetworkVariableData4; @@ -665,7 +665,7 @@ protected override void OnSynchronize(ref BufferSerializer serializer) internal class NetworkBehaviourOnSynchronizeComponent : NetworkBehaviour { - public SomeCustomSerializationData CustomSerializationData = new SomeCustomSerializationData(); + internal SomeCustomSerializationData CustomSerializationData = new SomeCustomSerializationData(); internal struct SomeCustomSerializationData : INetworkSerializable { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkShowHideTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkShowHideTests.cs index f75f6e256b..6dab1b7ba0 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkShowHideTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkShowHideTests.cs @@ -65,9 +65,9 @@ public override void OnNetworkDespawn() } public NetworkVariable MyNetworkVariable = new NetworkVariable(); - public NetworkList MyListSetOnSpawn = new NetworkList(); + internal NetworkList MyListSetOnSpawn = new NetworkList(); public NetworkVariable MyOwnerReadNetworkVariable = new NetworkVariable(readPerm: NetworkVariableReadPermission.Owner); - public NetworkList MyList = new NetworkList(); + internal NetworkList MyList = new NetworkList(); public static NetworkManager NetworkManagerOfInterest; internal static int GainOwnershipCount = 0; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/NetworkTransformBase.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/NetworkTransformBase.cs index 8d9004ec94..35f6e4ead0 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/NetworkTransformBase.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/NetworkTransformBase.cs @@ -754,7 +754,7 @@ internal class NetworkTransformTestComponent : NetworkTransform public bool ServerAuthority; public bool ReadyToReceivePositionUpdate = false; - public NetworkTransformState AuthorityLastSentState; + internal NetworkTransformState AuthorityLastSentState; public bool StatePushed { get; internal set; } public delegate void AuthorityPushedTransformStateDelegateHandler(ref NetworkTransformState networkTransformState); diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkUpdateLoopTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkUpdateLoopTests.cs index e8d773f68c..ecaf3ec792 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkUpdateLoopTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkUpdateLoopTests.cs @@ -290,8 +290,8 @@ private struct MonoBehaviourCallbacks private class MyGameScript : MonoBehaviour, INetworkUpdateSystem { - public NetworkUpdateCallbacks UpdateCallbacks; - public MonoBehaviourCallbacks BehaviourCallbacks; + internal NetworkUpdateCallbacks UpdateCallbacks; + internal MonoBehaviourCallbacks BehaviourCallbacks; private void Awake() { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVarBufferCopyTest.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVarBufferCopyTest.cs index ab894f0ce6..aa268f7fc7 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVarBufferCopyTest.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVarBufferCopyTest.cs @@ -78,7 +78,7 @@ public DummyNetVar( internal class DummyNetBehaviour : NetworkBehaviour { public static bool DistributedAuthority; - public DummyNetVar NetVar; + internal DummyNetVar NetVar; private void Awake() { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs index 7e882d0085..0154e4d6de 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs @@ -1222,7 +1222,7 @@ public static void ResetState() public NetworkVariable> ListCollectionServer = new NetworkVariable>(new HashSet(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server); public NetworkVariable> ListCollectionOwner = new NetworkVariable>(new HashSet(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner); // This tracks what has changed per instance which is used to compare to all other instances - public Dictionary>> NetworkVariableChanges = new Dictionary>>(); + internal Dictionary>> NetworkVariableChanges = new Dictionary>>(); public bool ValidateInstances() { @@ -1471,7 +1471,7 @@ public static void ResetState() public NetworkVariable>> ListCollectionServer = new NetworkVariable>>(new Dictionary>(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server); public NetworkVariable>> ListCollectionOwner = new NetworkVariable>>(new Dictionary>(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner); // This tracks what has changed per instance which is used to compare to all other instances - public Dictionary>>> NetworkVariableChanges = new Dictionary>>>(); + internal Dictionary>>> NetworkVariableChanges = new Dictionary>>>(); private bool CompareDictionaries(ulong clientId, Dictionary first, Dictionary second) { @@ -1778,7 +1778,7 @@ public static void ResetState() public NetworkVariable> ListCollectionServer = new NetworkVariable>(new Dictionary(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server); public NetworkVariable> ListCollectionOwner = new NetworkVariable>(new Dictionary(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner); // This tracks what has changed per instance which is used to compare to all other instances - public Dictionary>> NetworkVariableChanges = new Dictionary>>(); + internal Dictionary>> NetworkVariableChanges = new Dictionary>>(); private bool CompareDictionaries(ulong clientId, Dictionary first, Dictionary second) { @@ -2145,7 +2145,7 @@ public static void ResetState() public NetworkVariable>> ListCollectionServer = new NetworkVariable>>(new List>(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server); public NetworkVariable>> ListCollectionOwner = new NetworkVariable>>(new List>(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner); // This tracks what has changed per instance which is used to compare to all other instances - public Dictionary>>> NetworkVariableChanges = new Dictionary>>>(); + internal Dictionary>>> NetworkVariableChanges = new Dictionary>>>(); public bool ValidateInstances() { @@ -2444,7 +2444,7 @@ public static void ResetState() public NetworkVariable> ListCollectionServer = new NetworkVariable>(new List(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server); public NetworkVariable> ListCollectionOwner = new NetworkVariable>(new List(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner); // This tracks what has changed per instance which is used to compare to all other instances - public Dictionary>> NetworkVariableChanges = new Dictionary>>(); + internal Dictionary>> NetworkVariableChanges = new Dictionary>>(); public bool ValidateInstances() { @@ -2709,7 +2709,7 @@ public static void ResetState() public NetworkVariable>> ListCollectionServer = new NetworkVariable>>(new List>(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server); public NetworkVariable>> ListCollectionOwner = new NetworkVariable>>(new List>(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner); // This tracks what has changed per instance which is used to compare to all other instances - public Dictionary>>> NetworkVariableChanges = new Dictionary>>>(); + internal Dictionary>>> NetworkVariableChanges = new Dictionary>>>(); public bool ValidateInstances() { @@ -3013,7 +3013,7 @@ public static void ResetState() public NetworkVariable> ListCollectionServer = new NetworkVariable>(new List(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server); public NetworkVariable> ListCollectionOwner = new NetworkVariable>(new List(), NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner); // This tracks what has changed per instance which is used to compare to all other instances - public Dictionary>> NetworkVariableChanges = new Dictionary>>(); + internal Dictionary>> NetworkVariableChanges = new Dictionary>>(); public bool ValidateInstances() { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTestsHelperTypes.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTestsHelperTypes.cs index 506011d2ac..47697de5b4 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTestsHelperTypes.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTestsHelperTypes.cs @@ -105,10 +105,10 @@ internal class CustomSerializableSubclassWithNativeArray : Cu internal class CustomGenericSerializationTestBehaviour : NetworkBehaviour { - public CustomSerializableClass Value1; - public CustomSerializableClass, NativeArray> Value2; - public CustomSerializableSubclass Value3; - public CustomSerializableSubclassWithNativeArray> Value4; + internal CustomSerializableClass Value1; + internal CustomSerializableClass, NativeArray> Value2; + internal CustomSerializableSubclass Value3; + internal CustomSerializableSubclassWithNativeArray> Value4; } [GenerateSerializationForType(typeof(TypeReferencedOnlyInCustomSerialization5))] @@ -915,7 +915,7 @@ internal class NetVarILPPClassForTests : NetworkBehaviour public NetworkVariable StringVar; public NetworkVariable GuidVar; - public NetworkVariableSubclass> SubclassVar; + internal NetworkVariableSubclass> SubclassVar; } internal class TemplateNetworkBehaviourType : NetworkBehaviour diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerModifiedTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerModifiedTests.cs index 1526684aee..0350e901dc 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerModifiedTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerModifiedTests.cs @@ -11,7 +11,7 @@ namespace Unity.Netcode.RuntimeTests internal class OwnerModifiedObject : NetworkBehaviour, INetworkUpdateSystem { - public NetworkList MyNetworkList; + internal NetworkList MyNetworkList; internal static int Updates = 0; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs index cee5a131c6..0358ea8bc0 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs @@ -19,9 +19,9 @@ internal class OwnerPermissionObject : NetworkBehaviour public NetworkVariable MyNetworkVariableServer; // a client-owned NetworkVariable - public NetworkList MyNetworkListOwner; + internal NetworkList MyNetworkListOwner; // a server-owned NetworkVariable - public NetworkList MyNetworkListServer; + internal NetworkList MyNetworkListServer; // verifies two lists are identical public static void CheckLists(NetworkList listA, NetworkList listB) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Profiling/NetworkVariableNameTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Profiling/NetworkVariableNameTests.cs index c0b870193a..52c0cabc12 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Profiling/NetworkVariableNameTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Profiling/NetworkVariableNameTests.cs @@ -40,7 +40,7 @@ public void VerifyNetworkVariableNameInitialization() private class NetworkVariableNameComponent : NetworkBehaviour { - public NetworkList NetworkVarList = new NetworkList(); + internal NetworkList NetworkVarList = new NetworkList(); } } } diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/UniversalRpcTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/UniversalRpcTests.cs index a0c17aab7d..f943422b39 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/UniversalRpcTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/UniversalRpcTests.cs @@ -25,7 +25,7 @@ internal class UniversalRpcNetworkBehaviour : NetworkBehaviour { public bool Stop = false; public string Received = string.Empty; - public Tuple ReceivedParams = null; + internal Tuple ReceivedParams = null; public ulong ReceivedFrom = ulong.MaxValue; public int ReceivedCount; From 02db2bc4b69242a4e20a28604ba3ff24c272cff3 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 2 Mar 2026 13:51:17 -0600 Subject: [PATCH 5/9] update Reverting some changes. Adding NETCODE_UAC1001_CHECKS (for now) wrapped [Serializable] decorations to anything that is public and not already considered serializable. --- .../Runtime/Components/HalfVector3.cs | 4 ++ .../Runtime/Components/HalfVector4.cs | 4 ++ .../BufferedLinearInterpolator.cs | 3 ++ .../Components/NetworkDeltaPosition.cs | 4 ++ .../RigidbodyContactEventManager.cs | 4 ++ .../Collections/NetworkList.cs | 3 ++ .../SceneManagement/NetworkSceneManager.cs | 3 ++ .../Runtime/Spawning/NetworkSpawnManager.cs | 3 ++ .../Runtime/Timing/NetworkTickSystem.cs | 3 ++ .../Runtime/Timing/NetworkTime.cs | 3 ++ .../Runtime/Timing/NetworkTimeSystem.cs | 3 ++ .../Runtime/Unity.Netcode.Runtime.asmdef | 5 ++ .../NetworkVariableTestComponent.cs | 50 +++++++++---------- .../DistributedAuthorityCodecTests.cs | 2 +- .../NetworkVariable/OwnerModifiedTests.cs | 2 +- .../NetworkVariable/OwnerPermissionTests.cs | 4 +- .../Profiling/NetworkVariableNameTests.cs | 2 +- .../TestHelpers/NetworkVariableHelper.cs | 2 + 18 files changed, 74 insertions(+), 30 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs b/com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs index d9367b010a..e33f2e9926 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs @@ -1,3 +1,4 @@ +using System; using System.Runtime.CompilerServices; using Unity.Mathematics; using UnityEngine; @@ -12,6 +13,9 @@ namespace Unity.Netcode.Components /// individual axis and the 16 bits of the half float are stored as values since C# does not have /// a half float type. /// +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public struct HalfVector3 : INetworkSerializable { internal const int Length = 3; diff --git a/com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs b/com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs index 8d7a000f38..3fd5b8f2d5 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs @@ -1,3 +1,4 @@ +using System; using System.Runtime.CompilerServices; using Unity.Mathematics; using UnityEngine; @@ -12,6 +13,9 @@ namespace Unity.Netcode.Components /// individual axis and the 16 bits of the half float are stored as values since C# does not have /// a half float type. /// +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public struct HalfVector4 : INetworkSerializable { internal const int Length = 4; diff --git a/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs b/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs index 419f0d94b0..de4b8f30b7 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs @@ -10,6 +10,9 @@ namespace Unity.Netcode /// Partially solves for message loss. Unclamped lerping helps hide this, but not completely /// /// The type of interpolated value +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public abstract class BufferedLinearInterpolator where T : struct { // Constant absolute value for max buffer count instead of dynamic time based value. This is in case we have very low tick rates, so diff --git a/com.unity.netcode.gameobjects/Runtime/Components/NetworkDeltaPosition.cs b/com.unity.netcode.gameobjects/Runtime/Components/NetworkDeltaPosition.cs index 1a112991db..ba2d4dbbbf 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/NetworkDeltaPosition.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/NetworkDeltaPosition.cs @@ -1,3 +1,4 @@ +using System; using System.Runtime.CompilerServices; using Unity.Mathematics; using UnityEngine; @@ -7,6 +8,9 @@ namespace Unity.Netcode.Components /// /// Used to synchromnize delta position when half float precision is enabled /// +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public struct NetworkDeltaPosition : INetworkSerializable { internal const float MaxDeltaBeforeAdjustment = 64f; diff --git a/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs b/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs index bf54c4d964..dedc29cdac 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs @@ -1,4 +1,5 @@ #if COM_UNITY_MODULES_PHYSICS +using System; using System.Collections.Generic; using Unity.Collections; using Unity.Jobs; @@ -11,6 +12,9 @@ namespace Unity.Netcode.Components /// Information a returns to via
/// if the registers itself with as opposed to . ///
+#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public struct ContactEventHandlerInfo { /// diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Collections/NetworkList.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Collections/NetworkList.cs index 18322ee332..cccb1c5db4 100644 --- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Collections/NetworkList.cs +++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Collections/NetworkList.cs @@ -10,6 +10,9 @@ namespace Unity.Netcode /// /// The type for the list [GenerateSerializationForGenericParameter(0)] +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public class NetworkList : NetworkVariableBase where T : unmanaged, IEquatable { private NativeList m_List = new NativeList(64, Allocator.Persistent); diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index 0e75f0c92f..ff8dc3bfd2 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -144,6 +144,9 @@ public class SceneEvent /// Main class for managing network scenes when is enabled. /// Uses the message to communicate between the server and client(s) /// +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public class NetworkSceneManager : IDisposable { internal const int InvalidSceneNameOrPath = -1; diff --git a/com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs b/com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs index 987db29d93..80b19f69e3 100644 --- a/com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs @@ -11,6 +11,9 @@ namespace Unity.Netcode /// /// Class that handles object spawning /// +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public class NetworkSpawnManager { // Stores the objects that need to be shown at end-of-frame diff --git a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTickSystem.cs b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTickSystem.cs index 75ac0ac259..c7ede34220 100644 --- a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTickSystem.cs +++ b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTickSystem.cs @@ -7,6 +7,9 @@ namespace Unity.Netcode /// Provides discretized time. /// This is useful for games that require ticks happening at regular interval on the server and clients. /// +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public class NetworkTickSystem { #if DEVELOPMENT_BUILD || UNITY_EDITOR diff --git a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs index c37c29fa75..ad485e5355 100644 --- a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs +++ b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs @@ -9,6 +9,9 @@ namespace Unity.Netcode /// Time is stored as a combination of amount of passed ticks + a duration offset. /// This struct is meant to replace the Unity API for multiplayer gameplay. /// +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public struct NetworkTime { private double m_TimeSec; diff --git a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTimeSystem.cs b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTimeSystem.cs index 3bc0422494..2ab0abd38e 100644 --- a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTimeSystem.cs +++ b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTimeSystem.cs @@ -10,6 +10,9 @@ namespace Unity.Netcode /// as last received from the server plus an offset based on the current RTT - in other words, it is a best-guess /// effort at predicting what the server tick will be when a given network action is processed on the server. /// +#if NETCODE_UAC1001_CHECKS + [Serializable] +#endif public class NetworkTimeSystem { /// diff --git a/com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef b/com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef index c04d2a6fd4..f499995bf2 100644 --- a/com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef +++ b/com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef @@ -97,6 +97,11 @@ "name": "Unity", "expression": "6000.5.0a7", "define": "NGO_FINDOBJECTS_NOSORTING" + }, + { + "name": "Unity", + "expression": "6000.5.0a8", + "define": "NETCODE_UAC1001_CHECKS" } ], "noEngineReferences": false diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs index 465b096b15..3e77d9762b 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs @@ -208,31 +208,31 @@ internal class NetworkVariableTestComponent : NetworkBehaviour private NetworkVariable m_NetworkVariableManaged = new NetworkVariable(); - internal NetworkVariableHelper Bool_Var; - internal NetworkVariableHelper Byte_Var; - internal NetworkVariableHelper Color_Var; - internal NetworkVariableHelper Color32_Var; - internal NetworkVariableHelper Double_Var; - internal NetworkVariableHelper Float_Var; - internal NetworkVariableHelper Int_Var; - internal NetworkVariableHelper Long_Var; - internal NetworkVariableHelper Sbyte_Var; - internal NetworkVariableHelper Quaternion_Var; - internal NetworkVariableHelper Pose_Var; - internal NetworkVariableHelper Short_Var; - internal NetworkVariableHelper Vector4_Var; - internal NetworkVariableHelper Vector3_Var; - internal NetworkVariableHelper Vector2_Var; - internal NetworkVariableHelper Ray_Var; - internal NetworkVariableHelper Ulong_Var; - internal NetworkVariableHelper Uint_Var; - internal NetworkVariableHelper Ushort_Var; - internal NetworkVariableHelper FixedString32_Var; - internal NetworkVariableHelper FixedString64_Var; - internal NetworkVariableHelper FixedString128_Var; - internal NetworkVariableHelper FixedString512_Var; - internal NetworkVariableHelper FixedString4096_Var; - internal NetworkVariableHelper Managed_Var; + public NetworkVariableHelper Bool_Var; + public NetworkVariableHelper Byte_Var; + public NetworkVariableHelper Color_Var; + public NetworkVariableHelper Color32_Var; + public NetworkVariableHelper Double_Var; + public NetworkVariableHelper Float_Var; + public NetworkVariableHelper Int_Var; + public NetworkVariableHelper Long_Var; + public NetworkVariableHelper Sbyte_Var; + public NetworkVariableHelper Quaternion_Var; + public NetworkVariableHelper Pose_Var; + public NetworkVariableHelper Short_Var; + public NetworkVariableHelper Vector4_Var; + public NetworkVariableHelper Vector3_Var; + public NetworkVariableHelper Vector2_Var; + public NetworkVariableHelper Ray_Var; + public NetworkVariableHelper Ulong_Var; + public NetworkVariableHelper Uint_Var; + public NetworkVariableHelper Ushort_Var; + public NetworkVariableHelper FixedString32_Var; + public NetworkVariableHelper FixedString64_Var; + public NetworkVariableHelper FixedString128_Var; + public NetworkVariableHelper FixedString512_Var; + public NetworkVariableHelper FixedString4096_Var; + public NetworkVariableHelper Managed_Var; public bool EnableTesting; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs index 6d6c7c617e..b6157324bc 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DistributedAuthorityCodecTests.cs @@ -74,7 +74,7 @@ private static ushort GetPortToBind() internal class TestNetworkComponent : NetworkBehaviour { - internal NetworkList MyNetworkList = new NetworkList(new List { 1, 2, 3 }); + public NetworkList MyNetworkList = new NetworkList(new List { 1, 2, 3 }); public NetworkVariable MyNetworkVar = new NetworkVariable(3); [Rpc(SendTo.Authority)] diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerModifiedTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerModifiedTests.cs index 0350e901dc..1526684aee 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerModifiedTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerModifiedTests.cs @@ -11,7 +11,7 @@ namespace Unity.Netcode.RuntimeTests internal class OwnerModifiedObject : NetworkBehaviour, INetworkUpdateSystem { - internal NetworkList MyNetworkList; + public NetworkList MyNetworkList; internal static int Updates = 0; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs index 0358ea8bc0..cee5a131c6 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs @@ -19,9 +19,9 @@ internal class OwnerPermissionObject : NetworkBehaviour public NetworkVariable MyNetworkVariableServer; // a client-owned NetworkVariable - internal NetworkList MyNetworkListOwner; + public NetworkList MyNetworkListOwner; // a server-owned NetworkVariable - internal NetworkList MyNetworkListServer; + public NetworkList MyNetworkListServer; // verifies two lists are identical public static void CheckLists(NetworkList listA, NetworkList listB) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Profiling/NetworkVariableNameTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Profiling/NetworkVariableNameTests.cs index 52c0cabc12..c0b870193a 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Profiling/NetworkVariableNameTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Profiling/NetworkVariableNameTests.cs @@ -40,7 +40,7 @@ public void VerifyNetworkVariableNameInitialization() private class NetworkVariableNameComponent : NetworkBehaviour { - internal NetworkList NetworkVarList = new NetworkList(); + public NetworkList NetworkVarList = new NetworkList(); } } } diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/TestHelpers/NetworkVariableHelper.cs b/com.unity.netcode.gameobjects/Tests/Runtime/TestHelpers/NetworkVariableHelper.cs index bdfd7ab7fd..2c45b5067b 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/TestHelpers/NetworkVariableHelper.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/TestHelpers/NetworkVariableHelper.cs @@ -15,6 +15,7 @@ namespace Unity.Netcode.TestHelpers.Runtime /// From both we can then at least determine if the value indeed changed /// /// The type of value managed by the NetworkVariable + [Serializable] public class NetworkVariableHelper : NetworkVariableBaseHelper { private readonly NetworkVariable m_NetworkVariable; @@ -89,6 +90,7 @@ public NetworkVariableHelper(NetworkVariableBase networkVariable) : base(network /// The number of times a specific NetworkVariable instance had its value changed (i.e. !Equal) /// Note: This could be expanded for future tests focuses around NetworkVariables /// + [Serializable] public class NetworkVariableBaseHelper { private static Dictionary s_Instances; From 4ef194fab6f9ecf47f49b950352ab6f43486a950 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 2 Mar 2026 14:03:21 -0600 Subject: [PATCH 6/9] fix Removing trailing spaces. --- .../Components/Interpolator/BufferedLinearInterpolator.cs | 2 +- com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs b/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs index de4b8f30b7..7e5de7a26c 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs @@ -12,7 +12,7 @@ namespace Unity.Netcode /// The type of interpolated value #if NETCODE_UAC1001_CHECKS [Serializable] -#endif +#endif public abstract class BufferedLinearInterpolator where T : struct { // Constant absolute value for max buffer count instead of dynamic time based value. This is in case we have very low tick rates, so diff --git a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs index ad485e5355..b0380bb861 100644 --- a/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs +++ b/com.unity.netcode.gameobjects/Runtime/Timing/NetworkTime.cs @@ -11,7 +11,7 @@ namespace Unity.Netcode /// #if NETCODE_UAC1001_CHECKS [Serializable] -#endif +#endif public struct NetworkTime { private double m_TimeSec; From 8283297195f6df175326c532e2c18ac5a77b7afe Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 2 Mar 2026 14:22:18 -0600 Subject: [PATCH 7/9] reverting No need to make this [Serializable] --- .../Runtime/Components/RigidbodyContactEventManager.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs b/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs index dedc29cdac..361ccab1fa 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs @@ -12,9 +12,6 @@ namespace Unity.Netcode.Components /// Information a returns to via
/// if the registers itself with as opposed to . /// -#if NETCODE_UAC1001_CHECKS - [Serializable] -#endif public struct ContactEventHandlerInfo { /// From 6ec6d49dc70c198678762e66db920ec8f77d0df1 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 2 Mar 2026 14:25:15 -0600 Subject: [PATCH 8/9] update Removing using directive no loner needed. --- .../Runtime/Components/RigidbodyContactEventManager.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs b/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs index 361ccab1fa..bf54c4d964 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs @@ -1,5 +1,4 @@ #if COM_UNITY_MODULES_PHYSICS -using System; using System.Collections.Generic; using Unity.Collections; using Unity.Jobs; From fe02d2063f3e2fb1a82287ce4dbd623596507a81 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 2 Mar 2026 14:30:10 -0600 Subject: [PATCH 9/9] update Wrapping the added using directives. --- com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs | 2 ++ com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs | 2 ++ .../Runtime/Components/NetworkDeltaPosition.cs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs b/com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs index e33f2e9926..04f062a830 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/HalfVector3.cs @@ -1,4 +1,6 @@ +#if NETCODE_UAC1001_CHECKS using System; +#endif using System.Runtime.CompilerServices; using Unity.Mathematics; using UnityEngine; diff --git a/com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs b/com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs index 3fd5b8f2d5..bcc916e2fe 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/HalfVector4.cs @@ -1,4 +1,6 @@ +#if NETCODE_UAC1001_CHECKS using System; +#endif using System.Runtime.CompilerServices; using Unity.Mathematics; using UnityEngine; diff --git a/com.unity.netcode.gameobjects/Runtime/Components/NetworkDeltaPosition.cs b/com.unity.netcode.gameobjects/Runtime/Components/NetworkDeltaPosition.cs index ba2d4dbbbf..7dbc9b0653 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/NetworkDeltaPosition.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/NetworkDeltaPosition.cs @@ -1,4 +1,6 @@ +#if NETCODE_UAC1001_CHECKS using System; +#endif using System.Runtime.CompilerServices; using Unity.Mathematics; using UnityEngine;