Hey, been trying to figure out go netcode
now i’m struggling connecting with the second client as of a sudden.
I fixed this earlier today by removing and re-adding a networkobject script on one of the spawned prefabs.
So what happens is : two players, one is host and one is client
host starts game (using relay if thats important) and loads the main scene via the network scene manager.
Client joins via join code and that used to work, but only if i dont spawn said prefabs before the client joins.
He can see them and they work fine if i spawn them after he joined.
It works with another set of prefabs, which also get spawned once the host is in that scene.
Now that does not seem to help, besides the warning (yea not error) is not really much of help:
Here the full text:
Trying to receive TimeSyncMessage from client 0 which is not in a connected state.
UnityEngine.Debug:LogWarning (object)
Unity.Netcode.MessagingSystem:GetMessageVersion (System.Type,ulong,bool) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.3.1/Runtime/Messaging/MessagingSystem.cs:504)
Unity.Netcode.MessagingSystem:ReceiveMessage<Unity.Netcode.TimeSyncMessage> (Unity.Netcode.FastBufferReader,Unity.Netcode.NetworkContext&,Unity.Netcode.MessagingSystem) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.3.1/Runtime/Messaging/MessagingSystem.cs:530)
Unity.Netcode.MessagingSystem:HandleMessage (Unity.Netcode.MessageHeader&,Unity.Netcode.FastBufferReader,ulong,single,int) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.3.1/Runtime/Messaging/MessagingSystem.cs:416)
Unity.Netcode.MessagingSystem:ProcessIncomingMessageQueue () (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.3.1/Runtime/Messaging/MessagingSystem.cs:436)
Unity.Netcode.NetworkManager:OnNetworkEarlyUpdate () (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.3.1/Runtime/Core/NetworkManager.cs:1397)
Unity.Netcode.NetworkManager:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.3.1/Runtime/Core/NetworkManager.cs:1329)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.3.1/Runtime/Core/NetworkUpdateLoop.cs:185)
Unity.Netcode.NetworkUpdateLoop/NetworkEarlyUpdate/<>c:<CreateLoopSystem>b__0_0 () (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.3.1/Runtime/Core/NetworkUpdateLoop.cs:208)
Edit:
im using 1.3.1 btw and 2022.2.17
i tried 1.4.0 but its same
i also tried 1.1.0 which does not give any warning at all