public void SaveData(BinaryWriter bw) { BytesBuffer bb = SaveBytesBuffer(); int bbLength = bb.GetOffset(); bw.Write(bbLength); bw.Write(bb.GetBytes(), 0, bbLength); }
public void AddBytesBuffer(BytesBuffer bb) { int bbLength = bb.GetOffset(); //Debug.Log("bbLength = " + bbLength); AddInt(bbLength); AddBytes(bb.GetBytes(), bbLength); }