diff --git a/com.unity.netcode.gameobjects/Editor/CodeGen/CodeGenHelpers.cs b/com.unity.netcode.gameobjects/Editor/CodeGen/CodeGenHelpers.cs
index 2b3b7d99f1..41d4a8c570 100644
--- a/com.unity.netcode.gameobjects/Editor/CodeGen/CodeGenHelpers.cs
+++ b/com.unity.netcode.gameobjects/Editor/CodeGen/CodeGenHelpers.cs
@@ -208,6 +208,148 @@ public static bool HasInterface(this TypeReference typeReference, string interfa
}
}
+ ///
+ /// Checks a generic method instantiation against the generic constraints of the method it instantiates.
+ /// Mono does not enforce these on the calls codegen emits, but CoreCLR does, and it rejects the entire
+ /// calling method if any single call in it violates them.
+ ///
+ /// The instantiation to validate.
+ /// Why the instantiation is invalid, or null when it is valid.
+ /// True if every generic argument satisfies its parameter's constraints.
+ public static bool SatisfiesGenericConstraints(this GenericInstanceMethod method, out string violation)
+ {
+ var genericParameters = method.ElementMethod.Resolve().GenericParameters;
+ for (var i = 0; i < genericParameters.Count; ++i)
+ {
+ var parameter = genericParameters[i];
+ var argument = method.GenericArguments[i];
+ violation = GetConstraintViolation(parameter, argument, method.GenericArguments);
+ if (violation != null)
+ {
+ violation = $"{argument.FullName} {violation} (required by {parameter.Name} on {method.ElementMethod.Name})";
+ return false;
+ }
+ }
+
+ violation = null;
+ return true;
+ }
+
+ private static string GetConstraintViolation(GenericParameter parameter, TypeReference argument, IList methodArguments)
+ {
+ var resolved = argument.Resolve();
+ if (resolved == null)
+ {
+ return "could not be resolved";
+ }
+
+ if (parameter.HasNotNullableValueTypeConstraint && (!resolved.IsValueType || resolved.FullName == typeof(Nullable<>).FullName))
+ {
+ return "is not a non-nullable value type";
+ }
+
+ if (parameter.HasReferenceTypeConstraint && resolved.IsValueType)
+ {
+ return "is not a reference type";
+ }
+
+ if (parameter.HasDefaultConstructorConstraint && !resolved.IsValueType && (resolved.IsAbstract || !HasPublicParameterlessConstructor(resolved)))
+ {
+ return "does not have a public parameterless constructor";
+ }
+
+ foreach (var constraint in parameter.Constraints)
+ {
+#if CECIL_CONSTRAINTS_ARE_TYPE_REFERENCES
+ var constraintType = constraint;
+#else
+ var constraintType = constraint.ConstraintType;
+#endif
+ // The unmanaged constraint is encoded as System.ValueType modreq(UnmanagedType); the runtime only checks the value type part.
+ if (constraintType is RequiredModifierType modifierType)
+ {
+ constraintType = modifierType.ElementType;
+ }
+
+ constraintType = SubstituteGenericArguments(constraintType, GenericParameterType.Method, methodArguments);
+ if (constraintType.FullName == typeof(ValueType).FullName)
+ {
+ continue;
+ }
+
+ if (!IsAssignableTo(argument, constraintType.FullName))
+ {
+ return $"does not implement or derive from {constraintType.FullName}";
+ }
+ }
+
+ return null;
+ }
+
+ private static bool HasPublicParameterlessConstructor(TypeDefinition type)
+ {
+ foreach (var method in type.Methods)
+ {
+ if (method.IsConstructor && !method.IsStatic && method.IsPublic && !method.HasParameters)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private static bool IsAssignableTo(TypeReference type, string targetFullName)
+ {
+ if (type.FullName == targetFullName)
+ {
+ return true;
+ }
+
+ var resolved = type.Resolve();
+ if (resolved == null)
+ {
+ return false;
+ }
+
+ // Interfaces and the base type are declared against the definition's own generic parameters, so close them over this instance's arguments.
+ var typeArguments = (type as GenericInstanceType)?.GenericArguments;
+ foreach (var implemented in resolved.Interfaces)
+ {
+ if (IsAssignableTo(SubstituteGenericArguments(implemented.InterfaceType, GenericParameterType.Type, typeArguments), targetFullName))
+ {
+ return true;
+ }
+ }
+
+ return resolved.BaseType != null && IsAssignableTo(SubstituteGenericArguments(resolved.BaseType, GenericParameterType.Type, typeArguments), targetFullName);
+ }
+
+ private static TypeReference SubstituteGenericArguments(TypeReference type, GenericParameterType parameterType, IList arguments)
+ {
+ if (arguments == null)
+ {
+ return type;
+ }
+
+ if (type is GenericParameter genericParameter && genericParameter.Type == parameterType)
+ {
+ return arguments[genericParameter.Position];
+ }
+
+ if (type is GenericInstanceType genericInstance)
+ {
+ var substituted = new GenericInstanceType(genericInstance.ElementType);
+ foreach (var argument in genericInstance.GenericArguments)
+ {
+ substituted.GenericArguments.Add(SubstituteGenericArguments(argument, parameterType, arguments));
+ }
+ return substituted;
+ }
+
+ return type;
+ }
+
public static bool IsSerializable(this TypeReference typeReference)
{
var typeSystem = typeReference.Module.TypeSystem;
diff --git a/com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs b/com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs
index 0714f554dd..d8ab346df4 100644
--- a/com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs
+++ b/com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs
@@ -424,6 +424,19 @@ private void CreateNetworkVariableTypeInitializers(AssemblyDefinition assembly,
equalityMethod.GenericArguments.Add(type);
}
+ // A single call violating its constraints makes CoreCLR reject this whole method, dropping every registration in the assembly.
+ if (serializeMethod != null && !serializeMethod.SatisfiesGenericConstraints(out var serializeViolation))
+ {
+ m_Diagnostics.AddError($"{type} cannot be used in a network variable - {serializeViolation}.");
+ continue;
+ }
+
+ if (!equalityMethod.SatisfiesGenericConstraints(out var equalityViolation))
+ {
+ m_Diagnostics.AddError($"{type} cannot be used in a network variable - {equalityViolation}.");
+ continue;
+ }
+
if (serializeMethod != null)
{
instructions.Add(processor.Create(OpCodes.Call, m_MainModule.ImportReference(serializeMethod)));
diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/NetworkVariableEquality.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/NetworkVariableEquality.cs
index 6b0a3c08c0..6a0168511c 100644
--- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/NetworkVariableEquality.cs
+++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/NetworkVariableEquality.cs
@@ -124,7 +124,7 @@ internal static bool EqualityEqualsList(ref List a, ref
return true;
}
- internal static bool EqualityEqualsHashSet(ref HashSet a, ref HashSet b) where TValueType : IEquatable
+ internal static bool EqualityEqualsHashSet(ref HashSet a, ref HashSet b)
{
if (a == null != (b == null))
{
diff --git a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/TypedILPPInitializers.cs b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/TypedILPPInitializers.cs
index 9fd42b2ae3..9fe5e38b2d 100644
--- a/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/TypedILPPInitializers.cs
+++ b/com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/TypedILPPInitializers.cs
@@ -231,7 +231,7 @@ public static void InitializeEqualityChecker_List()
/// Registers an unmanaged type that will be checked for equality using T.Equals()
///
/// The type of elements in the HashSet
- public static void InitializeEqualityChecker_HashSet() where T : IEquatable
+ public static void InitializeEqualityChecker_HashSet()
{
NetworkVariableSerialization>.AreEqual = NetworkVariableEquality.EqualityEqualsHashSet;
}
diff --git a/com.unity.netcode.gameobjects/Tests/Editor/Build/BuildTests.cs b/com.unity.netcode.gameobjects/Tests/Editor/Build/BuildTests.cs
index 432f3bdef8..68720220c1 100644
--- a/com.unity.netcode.gameobjects/Tests/Editor/Build/BuildTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Editor/Build/BuildTests.cs
@@ -15,6 +15,10 @@ internal class BuildTests
// Increased the Build test timeout from 3 to 10 minutes.
[Timeout(900000)]
[Test]
+#if UNITY_EDITOR_LINUX
+ // Temporary: BuildPlayer hangs past the job timeout on the ubuntu CI agents (6000.7 and trunk), while Windows and macOS pass.
+ [Ignore("BuildPlayer hangs on the ubuntu CI agents; temporarily disabled on Linux editors until the ubuntu CI issue is resolved.")]
+#endif
public void BasicBuildTest()
{
var execAssembly = Assembly.GetExecutingAssembly();
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DeferredDespawningTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DeferredDespawningTests.cs
index 262d78dd0a..1902539113 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DeferredDespawningTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/DeferredDespawningTests.cs
@@ -53,9 +53,6 @@ protected override void OnServerAndClientsCreated()
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator DeferredDespawning()
{
// Setup for test
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs
index fd0723e111..f4b1167a9e 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/NetworkClientAndPlayerObjectTests.cs
@@ -30,6 +30,7 @@ public NetworkClientAndPlayerObjectTests(HostOrServer hostOrServer) : base(hostO
protected override IEnumerator OnTearDown()
{
m_PlayerPrefabs.Clear();
+ m_ChangedPlayerPrefabs.Clear();
return base.OnTearDown();
}
@@ -47,7 +48,7 @@ protected override void OnNewClientCreated(NetworkManager networkManager)
{
if (m_DistributedAuthority)
{
- networkManager.OnFetchLocalPlayerPrefabToSpawn = FetchPlayerPrefabToSpawn;
+ networkManager.OnFetchLocalPlayerPrefabToSpawn = () => FetchPlayerPrefabToSpawn(networkManager);
}
base.OnNewClientCreated(networkManager);
}
@@ -56,11 +57,10 @@ protected override void OnNewClientCreated(NetworkManager networkManager)
/// Only for distributed authority mode
///
/// a unique player prefab for the player
- private GameObject FetchPlayerPrefabToSpawn()
+ private GameObject FetchPlayerPrefabToSpawn(NetworkManager networkManager)
{
var prefabObject = GetRandomPlayerPrefab();
- var clientId = m_ClientNetworkManagers[m_ClientNetworkManagers.Length - 1].LocalClientId;
- m_ChangedPlayerPrefabs.Add(clientId, prefabObject.GlobalObjectIdHash);
+ m_ChangedPlayerPrefabs.Add(networkManager.LocalClientId, prefabObject.GlobalObjectIdHash);
return prefabObject.gameObject;
}
@@ -155,9 +155,6 @@ private bool AllNetworkClientsValidated()
/// Validates the same thing when a client late joins and when a client disconnects.
///
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("ValidateNetworkClients throws duplicate-key ArgumentException on CoreCLR (DAHost), see https://jira.unity3d.com/browse/UUM-149595")]
-#endif
public IEnumerator ValidateNetworkClients()
{
// Validate the initial clients created
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/Configuration/SinglePlayerSessions.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/Configuration/SinglePlayerSessions.cs
index 7b46e03916..945807a06c 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/Configuration/SinglePlayerSessions.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/Configuration/SinglePlayerSessions.cs
@@ -151,9 +151,6 @@ protected override void OnNewClientCreated(NetworkManager networkManager)
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator SwitchTransportTest()
{
var authority = GetAuthorityNetworkManager();
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/NetworkVariable/CustomSerializationDocsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/NetworkVariable/CustomSerializationDocsTests.cs
index fc87bd93af..1e6096b187 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/NetworkVariable/CustomSerializationDocsTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/DocumentationCodeSamples/NetworkVariable/CustomSerializationDocsTests.cs
@@ -1,8 +1,5 @@
using System.Collections;
using System.Text;
-#if ENABLE_CORECLR
-using NUnit.Framework;
-#endif
using Unity.Netcode;
using Unity.Netcode.TestHelpers.Runtime;
using UnityEngine;
@@ -176,9 +173,6 @@ private bool ValidateAllAreEqual(StringBuilder errorLog)
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestHealthCode()
{
var authority = GetAuthorityNetworkManager();
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Messaging/MessageReceiveAllocationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Messaging/MessageReceiveAllocationTests.cs
index b0520eb486..bcd768ac9c 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/Messaging/MessageReceiveAllocationTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/Messaging/MessageReceiveAllocationTests.cs
@@ -23,7 +23,6 @@ public void NotMeRpc()
[TestFixture(HostOrServer.Host)]
[TestFixture(HostOrServer.DAHost)]
- [UnityCoreClrExplicitDisabled("https://jira.unity3d.com/browse/UUM-149591", "NGO multi-instance test sessions fail to start/connect or time out on CoreCLR")]
internal class MessageReceiveAllocationTests : NetcodeIntegrationTest
{
protected override int NumberOfClients => 1;
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs
index f0deca9593..7535e4ffce 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectSynchronizationTests.cs
@@ -94,9 +94,6 @@ protected override void OnNewClientCreated(NetworkManager networkManager)
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public IEnumerator NetworkObjectDeserializationFailure()
{
m_CurrentLogLevel = LogLevel.Nothing;
@@ -280,9 +277,6 @@ private void ValidateNetworkBehaviourWithNetworkVariables(NetworkObject authorit
/// will still be initialized properly
///
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public IEnumerator NetworkBehaviourSynchronization()
{
var authority = GetAuthorityNetworkManager();
@@ -325,9 +319,6 @@ public IEnumerator NetworkBehaviourSynchronization()
/// A basic validation for the NetworkBehaviour.OnSynchronize method
///
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public IEnumerator NetworkBehaviourOnSynchronize()
{
var authority = GetAuthorityNetworkManager();
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkListTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkListTests.cs
index 5ff1529d66..daceeee8b9 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkListTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkListTests.cs
@@ -248,9 +248,6 @@ void TestForceUpdateCallback(NetworkListEvent _)
// don't extend this please
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator LegacyPredicateTesting()
{
var authority = GetAuthorityNetworkManager();
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableAnticipationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableAnticipationTests.cs
index aa56a4ef40..09d37cb64a 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableAnticipationTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableAnticipationTests.cs
@@ -58,9 +58,6 @@ public void SetReanticipateValueRpc(float f)
}
}
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
internal class NetworkVariableAnticipationTests : NetcodeIntegrationTest
{
protected override int NumberOfClients => 2;
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsChangingTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsChangingTests.cs
index cf9e0e103c..ce0b7d378c 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsChangingTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsChangingTests.cs
@@ -17,9 +17,6 @@ namespace Unity.Netcode.RuntimeTests
[TestFixture(HostOrServer.Host, CollectionTypes.Dictionary)]
[TestFixture(HostOrServer.Server, CollectionTypes.List)]
[TestFixture(HostOrServer.Server, CollectionTypes.Dictionary)]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
internal class NetworkVariableCollectionsChangingTests : NetcodeIntegrationTest
{
protected override int NumberOfClients => 2;
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs
index fb3d2a72bb..69e8727f27 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableCollectionsTests.cs
@@ -22,9 +22,6 @@ namespace Unity.Netcode.RuntimeTests
///
[TestFixture(HostOrServer.Host)]
[TestFixture(HostOrServer.Server)]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
internal class NetworkVariableCollectionsTests : NetcodeIntegrationTest
{
protected override int NumberOfClients => 2;
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableGeneralTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableGeneralTests.cs
index 8e3e954879..b0f3e8be56 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableGeneralTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableGeneralTests.cs
@@ -140,9 +140,6 @@ private bool ChangedValueMatches(StringBuilder errorLog)
/// instances invoke .
///
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator ApplyValueDuringSpawnSequence()
{
var authority = GetAuthorityNetworkManager();
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariablePermissionTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariablePermissionTests.cs
index 90f3f774ed..73481fd02c 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariablePermissionTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariablePermissionTests.cs
@@ -11,9 +11,6 @@
namespace Unity.Netcode.RuntimeTests
{
[TestFixtureSource(nameof(TestDataSource))]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
internal class NetworkVariablePermissionTests : NetcodeIntegrationTest
{
public static IEnumerable TestDataSource()
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs
index be4e94cb7c..a545d88fa8 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs
@@ -354,9 +354,6 @@ private void InitializeServerAndClients(HostOrServer useHost)
/// Runs generalized tests on all predefined NetworkVariable types
///
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void AllNetworkVariableTypes([Values] HostOrServer useHost)
{
#if UNIFIED_NETCODE
@@ -403,9 +400,6 @@ public void AllNetworkVariableTypes([Values] HostOrServer useHost)
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void ClientWritePermissionTest([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -420,9 +414,6 @@ public void ClientWritePermissionTest([Values] HostOrServer useHost)
/// Runs tests that network variables sync on client whatever the local value of .
///
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void NetworkVariableSync_WithDifferentTimeScale([Values] HostOrServer useHost, [Values(0.0f, 1.0f, 2.0f)] float timeScale)
{
Time.timeScale = timeScale;
@@ -437,9 +428,6 @@ public void NetworkVariableSync_WithDifferentTimeScale([Values] HostOrServer use
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void FixedString32Test([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -451,9 +439,6 @@ public void FixedString32Test([Values] HostOrServer useHost)
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableClass([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -473,9 +458,6 @@ bool VerifyClass()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableTemplateClass([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -494,9 +476,6 @@ bool VerifyClass()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableStruct([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -515,9 +494,6 @@ bool VerifyStructure()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableTemplateStruct([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -536,9 +512,6 @@ bool VerifyStructure()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableTemplateBehaviourClass([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -561,9 +534,6 @@ bool VerifyClass()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableTemplateBehaviourClassNotReferencedElsewhere([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -582,9 +552,6 @@ bool VerifyClass()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableTemplateBehaviourStruct([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -603,9 +570,6 @@ bool VerifyClass()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableEnum([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -623,9 +587,6 @@ bool VerifyStructure()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestINetworkSerializableClassCallsNetworkSerialize([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -644,9 +605,6 @@ public void TestINetworkSerializableClassCallsNetworkSerialize([Values] HostOrSe
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestINetworkSerializableStructCallsNetworkSerialize([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -661,9 +619,6 @@ public void TestINetworkSerializableStructCallsNetworkSerialize([Values] HostOrS
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void TestCustomGenericSerialization()
{
// Just verifies that the ILPP codegen initialized these values for this type.
@@ -717,9 +672,6 @@ public void TestUnsupportedManagedTypesThrowExceptions()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void TestUnsupportedManagedTypesWithUserSerializationDoNotThrowExceptions()
{
var variable = new NetworkVariable();
@@ -775,9 +727,6 @@ public void TestUnsupportedUnmanagedTypesThrowExceptions()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void TestTypesReferencedInSubclassSerializeSuccessfully()
{
var variable = new NetworkVariableSubclass>();
@@ -793,9 +742,6 @@ public void TestTypesReferencedInSubclassSerializeSuccessfully()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void TestUnsupportedUnmanagedTypesWithUserSerializationDoNotThrowExceptions()
{
var variable = new NetworkVariable();
@@ -869,9 +815,6 @@ public void WhenCreatingAnArrayOfNetVars_InitializingVariablesDoesNotThrowAnExce
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public void TestNetworkVariableChangeAndReturnInSameFrame([Values] HostOrServer useHost)
{
InitializeServerAndClients(useHost);
@@ -1429,9 +1372,6 @@ private void TestValueTypeNativeHashMap(NativeHashMap te
}
#endif
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void WhenSerializingAndDeserializingValueTypeNetworkVariables_ValuesAreSerializedCorrectly(
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
@@ -1599,9 +1539,6 @@ public void WhenSerializingAndDeserializingValueTypeNetworkVariables_ValuesAreSe
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void WhenSerializingAndDeserializingValueTypeNativeArrayNetworkVariables_ValuesAreSerializedCorrectly(
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
@@ -1945,9 +1882,6 @@ public string ArrayStr(NativeArray arr) where T : unmanaged
[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Ignored test tracked in MTT-11343
[Repeat(5)]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void WhenSerializingAndDeserializingVeryLargeValueTypeNativeArrayNetworkVariables_ValuesAreSerializedCorrectly(
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
@@ -2410,9 +2344,6 @@ public string DictionaryStr(Dictionary list)
[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Ignored test tracked in MTT-11343
[Repeat(5)]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void WhenSerializingAndDeserializingVeryLargeListNetworkVariables_ValuesAreSerializedCorrectly(
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
@@ -2608,9 +2539,6 @@ public void WhenSerializingAndDeserializingVeryLargeListNetworkVariables_ValuesA
[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Ignored test tracked in MTT-11343
[Repeat(5)]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void WhenSerializingAndDeserializingVeryLargeHashSetNetworkVariables_ValuesAreSerializedCorrectly(
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
@@ -2775,9 +2703,6 @@ public void WhenSerializingAndDeserializingVeryLargeHashSetNetworkVariables_Valu
[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.Android, RuntimePlatform.IPhonePlayer })] // Ignored test tracked in MTT-11343
[Repeat(5)]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void WhenSerializingAndDeserializingVeryLargeDictionaryNetworkVariables_ValuesAreSerializedCorrectly(
[Values(typeof(byte), typeof(ulong), typeof(Vector2), typeof(HashMapKeyClass))] Type keyType,
@@ -4894,9 +4819,6 @@ public void WhenSerializingAndDeserializingVeryLargeValueTypeNativeHashMapNetwor
#endif
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void TestManagedINetworkSerializableNetworkVariablesDeserializeInPlace()
{
var variable = new NetworkVariable
@@ -4933,9 +4855,6 @@ public void TestManagedINetworkSerializableNetworkVariablesDeserializeInPlace()
}
[Test]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public void TestUnmnagedINetworkSerializableNetworkVariablesDeserializeInPlace()
{
var variable = new NetworkVariable
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTraitsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTraitsTests.cs
index 0672b50077..97d3e7a499 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTraitsTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTraitsTests.cs
@@ -15,9 +15,6 @@ internal class NetworkVariableTraitsComponent : NetworkBehaviour
[TestFixture(HostOrServer.Host)]
[TestFixture(HostOrServer.DAHost)]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
internal class NetworkVariableTraitsTests : NetcodeIntegrationTest
{
protected override int NumberOfClients => 3;
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableUserSerializableTypesTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableUserSerializableTypesTests.cs
index 2b5700d3b8..c261bdf032 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableUserSerializableTypesTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableUserSerializableTypesTests.cs
@@ -142,9 +142,6 @@ private bool CheckForClientInstance() where T : WorkingUserNetworkVariableCom
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator WhenUsingAUserSerializableNetworkVariableWithUserSerialization_ReplicationWorks()
{
UserNetworkVariableSerialization.WriteValue = (FastBufferWriter writer, in MyTypeOne value) =>
@@ -185,9 +182,6 @@ public IEnumerator WhenUsingAUserSerializableNetworkVariableWithUserSerializatio
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator WhenUsingAUserSerializableNetworkVariableWithUserSerializationViaExtensionMethod_ReplicationWorks()
{
UserNetworkVariableSerialization.WriteValue = NetworkVariableUserSerializableTypesTestsExtensionMethods.WriteValueSafe;
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs
index 84edb4035e..95322ea42a 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/OwnerPermissionTests.cs
@@ -1,8 +1,5 @@
using System.Collections;
using System.Collections.Generic;
-#if ENABLE_CORECLR
-using NUnit.Framework;
-#endif
using Unity.Netcode.TestHelpers.Runtime;
using UnityEngine;
using UnityEngine.TestTools;
@@ -101,9 +98,6 @@ protected override void OnServerAndClientsCreated()
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("Unexpected owner write-permission error logged on CoreCLR, see https://jira.unity3d.com/browse/UUM-149597")]
-#endif
public IEnumerator OwnerPermissionTest()
{
// create 3 objects
@@ -111,10 +105,18 @@ public IEnumerator OwnerPermissionTest()
{
OwnerPermissionObject.CurrentlySpawning = objectIndex;
+ // Object N is owned by client id N; ids follow connection order, which is not guaranteed to match creation order
NetworkManager ownerManager = m_ServerNetworkManager;
if (objectIndex != 0)
{
- ownerManager = m_ClientNetworkManagers[objectIndex - 1];
+ foreach (var clientNetworkManager in m_ClientNetworkManagers)
+ {
+ if (clientNetworkManager.LocalClientId == (ulong)objectIndex)
+ {
+ ownerManager = clientNetworkManager;
+ break;
+ }
+ }
}
var spawnedInstance = SpawnObject(m_PrefabToSpawn, ownerManager);
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/PeerDisconnectCallbackTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/PeerDisconnectCallbackTests.cs
index 2daaaf7a5f..ef6d71fad5 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/PeerDisconnectCallbackTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/PeerDisconnectCallbackTests.cs
@@ -104,13 +104,20 @@ private void ClientToDisconnect_OnClientStopped(bool wasHost)
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO multi-instance test sessions fail to start/connect or time out on CoreCLR, see https://jira.unity3d.com/browse/UUM-149591")]
-#endif
public IEnumerator TestPeerDisconnectCallback([Values] ClientDisconnectType clientDisconnectType, [Values(1ul, 2ul, 3ul)] ulong disconnectedClient)
{
m_TargetClientShutdown = false;
- m_TargetClient = m_ClientNetworkManagers[disconnectedClient - 1];
+ // Client ids follow connection order, which is not guaranteed to match creation order
+ m_TargetClient = null;
+ foreach (var clientNetworkManager in m_ClientNetworkManagers)
+ {
+ if (clientNetworkManager.LocalClientId == disconnectedClient)
+ {
+ m_TargetClient = clientNetworkManager;
+ break;
+ }
+ }
+ Assert.NotNull(m_TargetClient, $"No client has id {disconnectedClient}!");
m_TargetClientId = m_TargetClient.LocalClientId;
m_TargetClient.OnClientStopped += ClientToDisconnect_OnClientStopped;
foreach (var client in m_NetworkManagers)
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTests.cs
index 306d329bbf..23c546e4fa 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTests.cs
@@ -91,9 +91,6 @@ protected override void OnCreatePlayerPrefab()
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestRpcs()
{
// This is the *SERVER VERSION* of the *CLIENT PLAYER* RpcTestNB component
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs
index 964cacac4a..ca1ce942ae 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs
@@ -1125,9 +1125,6 @@ public IEnumerator TestValueTypeNativeList(NativeList firstTest, NativeLis
#endif
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator WhenSendingAValueTypeOverAnRpc_ValuesAreSerializedCorrectly(
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
@@ -1542,9 +1539,6 @@ public IEnumerator WhenSendingAnArrayOfValueTypesOverAnRpc_ValuesAreSerializedCo
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator WhenSendingANativeArrayOfValueTypesOverAnRpc_ValuesAreSerializedCorrectly(
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkBehaviourReferenceTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkBehaviourReferenceTests.cs
index 9248ed159f..20e27d6492 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkBehaviourReferenceTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkBehaviourReferenceTests.cs
@@ -22,9 +22,6 @@ public NetworkBehaviourReferenceTests(HostOrServer hostOrServer) : base(hostOrSe
#region Tests using non-null NetworkBehaviours and RPCs
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestRpc()
{
yield return SpawnTestPrefabInstance();
@@ -39,9 +36,6 @@ public IEnumerator TestRpc()
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestRpcImplicitNetworkBehaviour()
{
yield return SpawnTestPrefabInstance();
@@ -57,9 +51,6 @@ public IEnumerator TestRpcImplicitNetworkBehaviour()
#region Tests using non-null NetworkBehaviours and NetworkVariable
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestNetworkVariable()
{
yield return SpawnTestPrefabInstance();
@@ -78,9 +69,6 @@ public IEnumerator TestNetworkVariable()
#region Validating using NULL as a NetworkBehaviourReference
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestSerializeNull()
{
yield return SpawnTestPrefabInstance(true);
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkObjectReferenceTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkObjectReferenceTests.cs
index 8d6122a27b..139a4a9e4f 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkObjectReferenceTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/Serialization/NetworkObjectReferenceTests.cs
@@ -34,9 +34,6 @@ protected override void OnOneTimeSetup()
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestSerializeNetworkObject()
{
yield return SpawnTestPrefabInstance();
@@ -64,9 +61,6 @@ public IEnumerator TestSerializeNetworkObject()
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestSerializeNull()
{
yield return SpawnTestPrefabInstance(true);
@@ -114,9 +108,6 @@ public IEnumerator TestSerializeNull()
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator TestGetReferenceAndConversion()
{
yield return SpawnTestPrefabInstance();
diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Transports/SinglePlayerTransportTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Transports/SinglePlayerTransportTests.cs
index 466a4e5a6b..4f198c73d2 100644
--- a/com.unity.netcode.gameobjects/Tests/Runtime/Transports/SinglePlayerTransportTests.cs
+++ b/com.unity.netcode.gameobjects/Tests/Runtime/Transports/SinglePlayerTransportTests.cs
@@ -176,9 +176,6 @@ protected override bool CanStartServerAndClients()
}
[UnityTest]
-#if ENABLE_CORECLR
- [Explicit("NGO NetworkVariable serialization codegen not generated for some types on CoreCLR (falls back to FallbackSerializer), see https://jira.unity3d.com/browse/UUM-149592")]
-#endif
public IEnumerator StartSinglePlayerAndSpawn()
{
m_CanStartHost = true;