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
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
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/gtmoncojoqBut 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