Using MPPM 0.2.0 on Unity 2023.1.3f1, with Netcode for Gameobjects 1.5.1, I encountered a situation that demands I restart my MPPM instances… and that wouldn’t be a problem - except this situation is extremely common.
All I had to do to trigger this situation, is to add a network transform component to my ‘player’ netcode gameobject.
Any attempt to enter a playmode session connection after that, results in “[Netcode] NetworkConfig mismatch. The configuration between the server and client does not match”.
I tried to dig deeper and it seems the network manager component in the scene has a
NetworkConfig that compares some hash. However, I have reasons to believe this hash somehow doesn’t get updated on the virtual players made by MPPM despite attempting to save the scene / reopening it.
I also confirmed other changes do pass to the virtual players - such as changing the floor material’s color. It is only this weird hash of Netcode for Gameobjects that fails to transfer.
I also confirmed this happens regardless of whether domain reload is enabled or disabled, which leads me to believe this is some serialized state that is not set to dirty within Netcode for Gameobjects, but I could be wrong?
How can I fix this so the MPPM experience can be smooth and without constant restarts any time I add or change a single component to my networked game using NGO?
Edit: I added a call to NGO’s NetworkManager.NetworkConfig.GetConfig() and the result seems to point to the hash on the virtual players changing when the networktransform is added… but the main player’s hash does not. I don’t know what to make of this, still investigating how this hash is constructed, a lot of things in it seem rather deterministic and cacheless?
Edit2: It appears that “Force same prefabs” fails makes this fail, and even with it off - there seems to be some prefab mismatch for the virtual player versus the main player. If I disable “force same prefabs” and additionally make a prefab list with manual hash number for the player prefab, the issue goes away - though this is far from comfortable or sustainable, and feels like it shouldn’t be an issue in the first place? I still don’t know what in MPPM causes this disparity.
Edit3: I may be wrong but I think I traced this to NetworkObject.GenerateGlobalObjectIdHash returning different hashes between the two players.
