ZeroFormatter
ZeroFormatter copied to clipboard
Unity WebGl issues
This might be a WebGl issue more than a ZeroFormatter issue.. but when running this code:
var mc = new Hello
{
Protocol = 1,
FirstName = "ABCDEFG",
LastName = "HIJKLMN",
};
var data = ZeroFormatterSerializer.Serialize<NetworkMessage>(mc);
var newmc = (Hello)ZeroFormatterSerializer.Deserialize<NetworkMessage>( data );
Debug.Log(newmc.FirstName);
Debug.Log(newmc.LastName);
In editor, I get;

As expected. But when running the same code in a compiled WebGl build I get

So some kind of corruption. Like I say though, this is probably more likely a Unity bug - but I thought you'd like to know it exists.