Skip to content

Commit 8d8fee9

Browse files
committed
Remove not needed static cleanup (breaking tests)
1 parent 08064c3 commit 8d8fee9

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

com.unity.netcode.gameobjects/Runtime/NetworkVariable/Serialization/NetworkVariableSerialization.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ namespace Unity.Netcode
66
/// Support methods for reading/writing NetworkVariables
77
/// Because there are multiple overloads of WriteValue/ReadValue based on different generic constraints,
88
/// but there's no way to achieve the same thing with a class, this sets up various read/write schemes
9-
/// based on which constraints are met by `T` using reflection, which is done at module load time.
9+
/// based on which constraints are met by `T` using reflection, which is done at compile time.
1010
/// </summary>
1111
/// <typeparam name="T">The type the associated NetworkVariable is templated on</typeparam>
12-
#if UNITY_6000_6_OR_NEWER
13-
[Scripting.LifecycleManagement.AutoStaticsCleanup]
14-
#endif
1512
[Serializable]
16-
public static partial class NetworkVariableSerialization<T>
13+
public static class NetworkVariableSerialization<T>
1714
{
15+
// This is all setup in ILPP (in the file NetworkBehaviorILPP), using the functions in TypedILPPInitializers.
16+
// There is no need to reset statics here.
1817
internal static INetworkVariableSerializer<T> Serializer = new FallbackSerializer<T>();
1918

2019
/// <summary>

0 commit comments

Comments
 (0)