Version: 2018.1
public byte[] ToArray ();

Returns

byte[] Copy of data used by the writer.

Description

Returns a copy of internal array of bytes the writer is using, it copies only the bytes used.

See NetworkWriting for a code example.