Open william-bratches opened 2 months ago
@william-bratches
This is actually a known issue with the live service. You can use collections with NetworkVariable
in place of NetworkList
.
The fix should not require an update to the NGO package, and it should (hopefully) be resolved soon.
Hey all,
I found what I believe to be a bug in the new 2.0.0-preview-4 edition of NGO. If a networkobject present in your scene contains a NetworkList with a custom struct, additional clients will fail to connect after the first. This took me awhile to debug, I was trying to figure out why none of my clients could connect after the scene was instantiated 😅
Here's example code I put together to demonstrate the solution, using the "WeaponBooster" struct from the current documentation:
If this code is present on any NetworkObject, additional clients will fail to connect.
If you change the
NetworkList<WeaponBooster>
to aNetworkList<int>
, everything works fine!I suspect something is wrong with serialization, or there is some change I need to make I'm not aware of. This code previously worked 100% fine in the client/host model.