Unity-Technologies / com.unity.netcode.gameobjects

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.15k stars 435 forks source link

NetworkVar typeof string causes serialization error when not set in constructor #143

Closed PapaBeefolini closed 5 years ago

PapaBeefolini commented 6 years ago

Having any NetworkVar with a typeof string will lead to a serious serialization error if the value is not set right-away in the constructor.

Doing this leads to an error- private NetworkedVar<string> TEST; The error in server's console- http://hatebin.com/gtmoncojoq

But doing this seems to work fine- private NetworkedVar<string> TEST = new NetworkedVar<string>(""); However this does actually lead to an issue of it's own- https://github.com/MidLevel/MLAPI/issues/142

TwoTenPvP commented 5 years ago

Issue should be resolved with this: https://github.com/MidLevel/MLAPI/commit/981a84f8d9b00748efd853ec0e2a8fce676cd7f5

Reopen if not