Hello, I have this error where the game network via Unity Relay have network config mismatch when yesterday this error have not appear and the networking run just fine. I’m following tutorial from code monkey unity relay to setup the Unity Relay other than that, no other script that changes Network Manager.
Same issue here, using the exact same project (and network manager) for server and client, but once I try to connect with the client, but cant because the same reason.
Just to note that I’m not on localhost, just deployed the dedicated server on its own address (it worked on the beginning, so it makes no sense to not work now since there is no changes on the network manager or transport).
If there is anyone that can define exactly what causes this issue WHEN having exactly the same network manager (same project basically) because it makes no sense at all.
Normally you get that message when there’s a mismatch in the following between server and client:
writer.WriteValueSafe(TickRate);
writer.WriteValueSafe(ConnectionApproval);
writer.WriteValueSafe(ForceSamePrefabs);
writer.WriteValueSafe(EnableSceneManagement);
writer.WriteValueSafe(EnsureNetworkVariableLengthSafety);
writer.WriteValueSafe(RpcHashSize);
That’s from Netcode’s NetworkConfig.cs source file, if you want to check the whole method it’s GetConfig(bool cache = true)
and starts at line 224 or thereabouts.
Thanks for pointing that out @cerestorm , I still don’t see why I still get that error even if I’m compiling the server and then the client with the exact same project, network manager and so on (it shouldn’t pop with “network mismatch” since all these values that is comparing later are the exact same)
Do you know if there is someway to set the cache to false to see if that helps?
I don’t know about caching but you could log all those values and see if they differ (NetworkManager.Singleton.NetworkConfig.TickRate
etc).
Hey, this is clearly a bug, you didn’t do anything wrong. Press for unity to solve this very very critical bug!
I was having this issue, I added a NetworkVariabke to a NetworkObject and suddenly i was getting this error. Git reverted to stable, restarted, tried building multiple times, nothing works. A workaround to this bug is to uncheck the Force Same Predab option on network management, then it will work, although this may cause other issues if your game has a lot of assets created on the fly. For me it’s not the case so it’s fine. In any case, this bug needs to be solved, and automated tests done so this doesn’t happen again! This has been showing up since 2018 guys!
Same problem here, I’m using parallel sync and from time to time I can’t connect the client to the host; I can’t understand why ?
It may be the Network Prefab List isn’t in sync, you could try unticking Force Same Prefabs on the network manager and seeing if that makes a difference.
Try setting ForceSamePrefabs to false, this should rule out any issues with prefabs between the builds, you may end up with issues elsewhere but at least we will know its a prefabs issue or not.
Have you figured out the solution ? For those who hasn’t solved this problem. I found out that for my project, all prefabs in the “Network Prefabs Lists” are deleted ( in my case only the player’s prefabs are in the list), i solved this problem by deleting the default Network Prefabs List and Unity automatically created a new list with all the network prefabs, if it doesn’t for you, you might have to create a new list and add them manually
For those of you using the new Multiplayer Play Mode package in Unity 6 and getting this error, if you have added a network prefab to any of the lists used by the NetworkManager, you will need to uncheck the player(s) you have running and recheck them in order to reload the virtual player.