Skip to content

Netcode Issue(?) #3888

Closed
Closed

Description

@Magman3000

Description

A clear and concise description of what the bug is.

Reproduce Steps

When Hosting
NullReferenceException: Object reference not set to an instance of an object
Unity.Netcode.ListSerializer1[T].Duplicate (System.Collections.Generic.List1[T]& value, System.Collections.Generic.List1[T]& duplicatedValue) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/NetworkVariable/Serialization/TypedSerializerImplementations.cs:344) Unity.Netcode.ListSerializer1[T].Unity.Netcode.INetworkVariableSerializer<System.Collections.Generic.List>.Duplicate (System.Collections.Generic.List1[T]& value, System.Collections.Generic.List1[T]& duplicatedValue) (at <638f8b09672547aea8c59a993b0e0e73>:0)
Unity.Netcode.NetworkVariableSerialization1[T].Duplicate (T& value, T& duplicatedValue) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/NetworkVariable/Serialization/NetworkVariableSerialization.cs:155) Unity.Netcode.NetworkVariable1[T].OnInitialize () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/NetworkVariable/NetworkVariable.cs:60)
Unity.Netcode.NetworkVariableBase.Initialize (Unity.Netcode.NetworkBehaviour networkBehaviour) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/NetworkVariable/NetworkVariableBase.cs:125)
Chat.__initializeVariables () (at <1c349474cc5642378be2cfec158ae21f>:0)
Unity.Netcode.NetworkBehaviour.InitializeVariables () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkBehaviour.cs:1019)
Unity.Netcode.NetworkBehaviour.InternalOnNetworkSpawn () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkBehaviour.cs:789)
Unity.Netcode.NetworkObject.InvokeBehaviourNetworkSpawn () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkObject.cs:2566)
Unity.Netcode.NetworkSpawnManager.SpawnNetworkObjectLocallyCommon (Unity.Netcode.NetworkObject networkObject, System.UInt64 networkId, System.Boolean sceneObject, System.Boolean playerObject, System.UInt64 ownerClientId, System.Boolean destroyWithScene) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Spawning/NetworkSpawnManager.cs:1197)
Unity.Netcode.NetworkSpawnManager.AuthorityLocalSpawn (Unity.Netcode.NetworkObject networkObject, System.UInt64 networkId, System.Boolean sceneObject, System.Boolean playerObject, System.UInt64 ownerClientId, System.Boolean destroyWithScene) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Spawning/NetworkSpawnManager.cs:1093)
Unity.Netcode.NetworkSpawnManager.ServerSpawnSceneObjectsOnStartSweep () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Spawning/NetworkSpawnManager.cs:1505)
Unity.Netcode.NetworkManager.HostServerInitialize () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkManager.cs:1481)
Unity.Netcode.NetworkManager.StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkManager.cs:1437)
UnityEngine.Debug:LogException(Exception)
Unity.Netcode.NetworkManager:StartHost() (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkManager.cs:1442)
Buttons:Host() (at Assets/Scripts/GameState/Buttons.cs:11)
UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

When trying to join as a client
[Netcode] A ConnectionRequestMessage was received from the server on the client side. NetworkTransport: Unity.Netcode.Transports.UTP.UnityTransport UnityTransportProtocol: UnityTransport. This should not happen. Please report this to the Netcode for GameObjects team at https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/issues and include the following data: Message Size: 170. Message Content: 02 02 7d 9a e2 a5 21 b2 36 17 b3 11 46 c4 ca 04 01 2a b2 f1 50 01 e9 3a b6 d2 01 39 3b e8 2c 01 ab c9 50 60 01 53 a3 38 44 21 d3 f6 1c b8 01 7f 10 0d af 01 f3 a2 4a 4a 01 a6 22 89 97 01 e9 4e 31 0d 01 b5 fe 01 74 11 be 97 be 73 01 bd 23 d8 d0 01 58 aa fb 1c 01 9d 9a 5c 01 01 e9 51 97 17 01 8a f7 e7 83 01 ee 80 1f c6 01 42 7f 88 c6 01 97 a3 f5 46 01 c2 40 2e a3 01 4e 67 03 d2 01 00 00 00 00 01 00 00 00 00 01 00 00 00 00 01 00 00 00 00 01 00 00 00 00 01 00 00 00 00 01 00 00 00 00 01 7b b0 63 b4 84 16 87 b7
UnityEngine.Debug:LogError (object)
Unity.Netcode.NetworkLog:LogError (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Logging/NetworkLog.cs:34)
Unity.Netcode.NetworkManagerHooks:OnVerifyCanReceive (ulong,System.Type,Unity.Netcode.FastBufferReader,Unity.Netcode.NetworkContext&) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Messaging/NetworkManagerHooks.cs:95)
Unity.Netcode.NetworkMessageManager:CanReceive (ulong,System.Type,Unity.Netcode.FastBufferReader,Unity.Netcode.NetworkContext&) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Messaging/NetworkMessageManager.cs:315)
Unity.Netcode.NetworkMessageManager:HandleMessage (Unity.Netcode.NetworkMessageHeader&,Unity.Netcode.FastBufferReader,ulong,single,int) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Messaging/NetworkMessageManager.cs:397)
Unity.Netcode.NetworkMessageManager:ProcessIncomingMessageQueue () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Messaging/NetworkMessageManager.cs:448)
Unity.Netcode.NetworkManager:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkManager.cs:349)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkUpdateLoop.cs:191)
Unity.Netcode.NetworkUpdateLoop/NetworkEarlyUpdate/<>c:b__0_0 () (at ./Library/PackageCache/com.unity.netcode.gameobjects@bd2a018756ed/Runtime/Core/NetworkUpdateLoop.cs:214)

Actual Outcome

When hosting player spawns as normal, but when trying to make a build join as a client, it won't join.

Expected Outcome

To be able to join as a client.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • OS: Windows
  • Unity Version: 6000.2.3f1
  • Netcode Version: 2.7.0 · October 31, 2025
  • Netcode Commit: (com.unity.netcode.gameobjects) ??
    • Netcode Topology: [e.g. Client-Server, Distributed Authority, etc.]
      -Unity Transport: 2.6.0
      -Mono Cecil: 1.11.4

Additional Context

Add any other context about the problem here. Logs, code snippets would be useful here but please also consider attaching a minimal Unity project that reproduces the issue.

Activity

  1. EmandM commented on Mar 5, 2026

    @EmandM
    Member

    Thanks for reporting this! Could you try updating to the latest version of Netcode for GameObjects (v2.10.0). There's a fix in that release that could resolve your issue.

  2. added
    stat:awaiting-responseAwaiting response from author. This label should be added manually.
    and removed on Mar 5, 2026
  3. Magman3000 commented on Mar 6, 2026

    @Magman3000
    Author

    Posting this to give reference to the slight shift in numbers due to the update.
    NullReferenceException: Object reference not set to an instance of an object
    Unity.Netcode.ListSerializer1[T].Duplicate (System.Collections.Generic.List1[T]& value, System.Collections.Generic.List1[T]& duplicatedValue) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/NetworkVariable/Serialization/TypedSerializerImplementations.cs:344) Unity.Netcode.ListSerializer1[T].Unity.Netcode.INetworkVariableSerializer<System.Collections.Generic.List>.Duplicate (System.Collections.Generic.List1[T]& value, System.Collections.Generic.List1[T]& duplicatedValue) (at <76fb2b6ce3064b70b1cc6a280f3a331a>:0)
    Unity.Netcode.NetworkVariableSerialization1[T].Duplicate (T& value, T& duplicatedValue) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/NetworkVariable/Serialization/NetworkVariableSerialization.cs:155) Unity.Netcode.NetworkVariable1[T].OnInitialize () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/NetworkVariable/NetworkVariable.cs:60)
    Unity.Netcode.NetworkVariableBase.Initialize (Unity.Netcode.NetworkBehaviour networkBehaviour) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/NetworkVariable/NetworkVariableBase.cs:127)
    Chat.__initializeVariables () (at :0)
    Unity.Netcode.NetworkBehaviour.InitializeVariables () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkBehaviour.cs:1134)
    Unity.Netcode.NetworkBehaviour.InternalOnNetworkSpawn () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkBehaviour.cs:802)
    Unity.Netcode.NetworkObject.InvokeBehaviourNetworkSpawn () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkObject.cs:2542)
    Unity.Netcode.NetworkSpawnManager.SpawnNetworkObjectLocallyCommon (Unity.Netcode.NetworkObject networkObject, System.UInt64 networkId, System.Boolean sceneObject, System.Boolean playerObject, System.UInt64 ownerClientId, System.Boolean destroyWithScene) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Spawning/NetworkSpawnManager.cs:1208)
    Unity.Netcode.NetworkSpawnManager.AuthorityLocalSpawn (Unity.Netcode.NetworkObject networkObject, System.UInt64 networkId, System.Boolean sceneObject, System.Boolean playerObject, System.UInt64 ownerClientId, System.Boolean destroyWithScene) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Spawning/NetworkSpawnManager.cs:1104)
    Unity.Netcode.NetworkSpawnManager.ServerSpawnSceneObjectsOnStartSweep () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Spawning/NetworkSpawnManager.cs:1507)
    Unity.Netcode.NetworkManager.HostServerInitialize () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1511)
    Unity.Netcode.NetworkManager.StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1466)
    UnityEngine.Debug:LogException(Exception)
    Unity.Netcode.NetworkManager:StartHost() (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1471)
    Buttons:Host() (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

  4. added and removed
    stat:awaiting-responseAwaiting response from author. This label should be added manually.
    on Mar 6, 2026
  5. Magman3000 commented on Mar 6, 2026

    @Magman3000
    Author

    Client Connect Error message disappeared, joining as a client still doesn't work.

  6. EmandM commented on Mar 6, 2026

    @EmandM
    Member

    Do you mind sharing more details about the problem. Are there any errors that are logged on the server or the client when the client joins?

    Try setting your NetworkManager.LogLevel to LogLevel.Developer to see if that gives more detail to find the issue.

    The second stack trace you have posted looks like there's a NetworkVariable containing a nested list where one of the nested list elements is set to null instead of a list.

  7. added
    stat:awaiting-responseAwaiting response from author. This label should be added manually.
    and removed on Mar 6, 2026
  8. Magman3000 commented on Mar 6, 2026

    @Magman3000
    Author

    Note that this is from an attempt to host and that no code of mine called shutdown

    (Debug)[Netcode] StartHost
    UnityEngine.Debug:Log (object)
    Unity.Netcode.NetworkLog:LogInfo (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Logging/NetworkLog.cs:22)
    Unity.Netcode.NetworkManager:StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1430)
    Buttons:Host () (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

    (Debug)[Netcode] Initialize
    UnityEngine.Debug:Log (object)
    Unity.Netcode.NetworkLog:LogInfo (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Logging/NetworkLog.cs:22)
    Unity.Netcode.NetworkManager:Initialize (bool) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1184)
    Unity.Netcode.NetworkManager:StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1445)
    Buttons:Host () (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

    (Debug)[Netcode] [Server-Side] Pending Client-0 connection approved!
    UnityEngine.Debug:Log (object)
    Unity.Netcode.NetworkLog:LogInfo (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Logging/NetworkLog.cs:22)
    Unity.Netcode.NetworkConnectionManager:HandleConnectionApproval (ulong,bool,System.Nullable1<uint>,System.Nullable1<UnityEngine.Vector3>,System.Nullable`1<UnityEngine.Quaternion>) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Connection/NetworkConnectionManager.cs:959)
    Unity.Netcode.NetworkManager:HostServerInitialize () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1508)
    Unity.Netcode.NetworkManager:StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1466)
    Buttons:Host () (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

    (Error)NullReferenceException: Object reference not set to an instance of an object
    Unity.Netcode.ListSerializer1[T].Duplicate (System.Collections.Generic.List1[T]& value, System.Collections.Generic.List1[T]& duplicatedValue) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/NetworkVariable/Serialization/TypedSerializerImplementations.cs:344) Unity.Netcode.ListSerializer1[T].Unity.Netcode.INetworkVariableSerializer<System.Collections.Generic.List>.Duplicate (System.Collections.Generic.List1[T]& value, System.Collections.Generic.List1[T]& duplicatedValue) (at <76fb2b6ce3064b70b1cc6a280f3a331a>:0)
    Unity.Netcode.NetworkVariableSerialization1[T].Duplicate (T& value, T& duplicatedValue) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/NetworkVariable/Serialization/NetworkVariableSerialization.cs:155) Unity.Netcode.NetworkVariable1[T].OnInitialize () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/NetworkVariable/NetworkVariable.cs:60)
    Unity.Netcode.NetworkVariableBase.Initialize (Unity.Netcode.NetworkBehaviour networkBehaviour) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/NetworkVariable/NetworkVariableBase.cs:127)
    Chat.__initializeVariables () (at :0)
    Unity.Netcode.NetworkBehaviour.InitializeVariables () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkBehaviour.cs:1134)
    Unity.Netcode.NetworkBehaviour.InternalOnNetworkSpawn () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkBehaviour.cs:802)
    Unity.Netcode.NetworkObject.InvokeBehaviourNetworkSpawn () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkObject.cs:2542)
    Unity.Netcode.NetworkSpawnManager.SpawnNetworkObjectLocallyCommon (Unity.Netcode.NetworkObject networkObject, System.UInt64 networkId, System.Boolean sceneObject, System.Boolean playerObject, System.UInt64 ownerClientId, System.Boolean destroyWithScene) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Spawning/NetworkSpawnManager.cs:1208)
    Unity.Netcode.NetworkSpawnManager.AuthorityLocalSpawn (Unity.Netcode.NetworkObject networkObject, System.UInt64 networkId, System.Boolean sceneObject, System.Boolean playerObject, System.UInt64 ownerClientId, System.Boolean destroyWithScene) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Spawning/NetworkSpawnManager.cs:1104)
    Unity.Netcode.NetworkSpawnManager.ServerSpawnSceneObjectsOnStartSweep () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Spawning/NetworkSpawnManager.cs:1507)
    Unity.Netcode.NetworkManager.HostServerInitialize () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1511)
    Unity.Netcode.NetworkManager.StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1466)
    UnityEngine.Debug:LogException(Exception)
    Unity.Netcode.NetworkManager:StartHost() (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1471)
    Buttons:Host() (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

    (Debug)[Netcode] ShutdownInternal
    UnityEngine.Debug:Log (object)
    Unity.Netcode.NetworkLog:LogInfo (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Logging/NetworkLog.cs:22)
    Unity.Netcode.NetworkManager:ShutdownInternal () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1610)
    Unity.Netcode.NetworkManager:StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1473)
    Buttons:Host () (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

    (Warning)[Netcode] Trying to destroy object 0 but it doesn't seem to exist anymore!
    UnityEngine.Debug:LogWarning (object)
    Unity.Netcode.NetworkLog:LogWarning (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Logging/NetworkLog.cs:28)
    Unity.Netcode.NetworkSpawnManager:OnDespawnObject (Unity.Netcode.NetworkObject,bool,bool) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Spawning/NetworkSpawnManager.cs:1576)
    Unity.Netcode.NetworkSpawnManager:DespawnAndDestroyNetworkObjects () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Spawning/NetworkSpawnManager.cs:1452)
    Unity.Netcode.NetworkManager:ShutdownInternal () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1650)
    Unity.Netcode.NetworkManager:StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1473)
    Buttons:Host () (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

    (Debug)[Netcode] [Disconnect Event][Client-0][TransportClientId-0][TransportShutdown] NetworkConnectionManager was shutdown. The transport was shutdown.
    UnityEngine.Debug:Log (object)
    Unity.Netcode.NetworkLog:LogInfo (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Logging/NetworkLog.cs:22)
    Unity.Netcode.NetworkConnectionManager:GenerateDisconnectInformation (ulong,ulong,string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Connection/NetworkConnectionManager.cs:614)
    Unity.Netcode.NetworkConnectionManager:Shutdown () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Connection/NetworkConnectionManager.cs:1599)
    Unity.Netcode.NetworkManager:ShutdownInternal () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1658)
    Unity.Netcode.NetworkManager:StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1473)
    Buttons:Host () (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

    (Warning)Directly calling UnityTransport.Shutdown() results in unexpected shutdown behaviour. All pending events will be lost. Use NetworkManager.Shutdown() instead.
    UnityEngine.Debug:LogWarning (object)
    Unity.Netcode.Transports.UTP.UnityTransport:Shutdown () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Transports/UTP/UnityTransport.cs:1714)
    Unity.Netcode.NetworkConnectionManager:Shutdown () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Connection/NetworkConnectionManager.cs:1681)
    Unity.Netcode.NetworkManager:ShutdownInternal () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1658)
    Unity.Netcode.NetworkManager:StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1473)
    Buttons:Host () (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

    (Debug)[Netcode] NetworkConnectionManager.Shutdown() -> IsListening && NetworkTransport != null -> NetworkTransport.Shutdown()
    UnityEngine.Debug:Log (object)
    Unity.Netcode.NetworkLog:LogInfo (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Logging/NetworkLog.cs:22)
    Unity.Netcode.NetworkConnectionManager:Shutdown () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Connection/NetworkConnectionManager.cs:1684)
    Unity.Netcode.NetworkManager:ShutdownInternal () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1658)
    Unity.Netcode.NetworkManager:StartHost () (at ./Library/PackageCache/com.unity.netcode.gameobjects@c690afa8ab6e/Runtime/Core/NetworkManager.cs:1473)
    Buttons:Host () (at Assets/Scripts/GameState/Buttons.cs:11)
    UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/com.unity.ugui@f33505fcd0e6/Runtime/UGUI/EventSystem/EventSystem.cs:514)

  9. 1 remaining item

  10. NoelStephensUnity commented on Mar 6, 2026

    @NoelStephensUnity
    Member

    Hi @Magman3000,

    This looks like there could be an issue with one of your NetworkVariables.
    How many declared NetworkVariable<List<T>> fields do you have?
    If only a few, could you post the script (or portions of it) where you are:

    • Declaring it.
    • Using/accessing it.

    If the type T in your list is an INetworkSerializable then could you post that too?

    Also, did you have developer logging enabled in NetworkManager when generating those logs? If not, then go ahead and enable that, re-run, and post the logs generated. That should get some additional details that could help track down the specific NetworkVariable<List<T>> field that is causing the issue.

    It looks like it could not be getting assigned.

    Things to look for:

        // This could be problematic
        private NetworkVariable<List<int>> m_NetworkVariable1;
    
        // This could be problematic (no default internal list defined)
        private NetworkVariable<List<int>> m_NetworkVariable2 = new NetworkVariable<List<int>>();
    
        /// <summary>
        /// Recommended way is to assign a new instance when it is declared with the default (i.e. empy list)
        /// </summary>
        private NetworkVariable<List<int>> m_NetworkVariable3 = new NetworkVariable<List<int>>(default);

    Let me know if you find the issue or please post back the additional information so we can help you find it.

  11. added
    stat:awaiting-responseAwaiting response from author. This label should be added manually.
    and removed on Mar 6, 2026
  12. Magman3000 commented on Mar 7, 2026

    @Magman3000
    Author

    Tested Commenting out the code on this component instead of toggling the component disabled out of paranoia, and things started working, so I guess that's a fix, but it affecting things without being active feels weird.

    [SerializeField] private GameObject chatPanel, textObject;
    private NetworkVariable<List<string>> entries = new NetworkVariable<List<string>>();
    
    public void AddEntry(string playerName, string message)
    {   
        entries.Value.Add(playerName + ": " + message);
        
    }
    
  13. added and removed
    stat:awaiting-responseAwaiting response from author. This label should be added manually.
    on Mar 7, 2026
  14. EmandM commented on Mar 9, 2026

    @EmandM
    Member

    Ah yes, if you have a NetworkVariable<List<string>> that's never initialized, then trying to add to the list will fail because the List is null. new NetworkVariable<List<string>>() initializes the NetworkVariable but not the underlying List. To initialize the underlying list you can use new NetworkVariable<List<string>>(new List<string>()).

  15. added
    stat:awaiting-responseAwaiting response from author. This label should be added manually.
    and removed on Mar 9, 2026
  16. removed
    stat:awaiting-responseAwaiting response from author. This label should be added manually.
    stat:awaiting-triageStatus - Awaiting triage from the Netcode team.
    stat:InvestigatingIssue is currently being investigated
    on Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions