stream serialize v/s sendNext
Hey,
i've been searching for this, but i have found none. that why I created this new topic.
The documentation of PUN is not helpful though
what is the difference between
[code2=csharp]stream.Serialize()[/code2] and [code2=csharp]stream.sendNext()[/code2]
they both send data...
which one is faster ? which one you recommend ?
any link/suggestion would be grateful.
i've been searching for this, but i have found none. that why I created this new topic.
The documentation of PUN is not helpful though

what is the difference between
[code2=csharp]stream.Serialize()[/code2] and [code2=csharp]stream.sendNext()[/code2]
they both send data...
which one is faster ? which one you recommend ?
any link/suggestion would be grateful.
0
Comments
I'll add some hint to the doc.
If serialize does the same as SendNext, and can also be used in place of RecieveNext, does it know what it's doing in relation to those dependant on the state of stream.isWriting?
If isWriting is true, you have to write. Either Serialize(...) or sendNext(...). If isWriting is false, this client is receiving stuff written somewhere else.
Your code for writing must match the one for reading the stream. Else, you will simply run into errors. The sent stream does carry the type per sent item but it doesn't keep you from attempting to fetch something from the stream that's not there.