NetWriter

Server Only: Used to write values during the serialization process to the net stream from the scripts.  This data will be sent over the network to the corresponding object on the remote client’s side.

Summary
NetWriterServer Only: Used to write values during the serialization process to the net stream from the scripts.
Functions
NKWriteBoolWrite a boolean value to the net stream
NKWriteDoubleWrite a double value to the net stream
NKWriteIntWrite an int value to the net stream
NKWriteStringWrite a string value to the net stream
NKWriteBufferWrite a byte data buffer to the net stream
NKWriteVec3Write a vector to the net stream
NKWriteQuatWrite a quaternion to the net stream
NKWriteGameObjectWrite a game object reference to the buffer.
NKWriteObjectIdWrite a game object’s network ID to the stream
NetReaderRemote Client Only: Used to read values during the deserialization process with the net stream in the scripts.
Functions
NKReadBoolRead a boolean value from the stream
NKReadDoubleRead a double value from the stream
NKReadIntRead an integer value from the stream
NKReadStringRead a string value from the stream
NKReadBufferRead a byte data buffer from the stream
NKReadVec3Read a vector value from the stream
NKReadQuatRead a quaternion value from the stream
NKReadGameObjectRead a game object reference from the stream
NKReadObjectIdRead a game object’s id reference from the net stream
NetStream

Functions

NKWriteBool

Write a boolean value to the net stream

Parameters

boolthe boolean value to write to the net stream

NKWriteDouble

Write a double value to the net stream

Parameters

doublethe double value to write to the net stream

NKWriteInt

Write an int value to the net stream

Parameters

intthe int value to write to the net stream

NKWriteString

Write a string value to the net stream

Parameters

stringthe string value to write to the net stream

NKWriteBuffer

Write a byte data buffer to the net stream

Parameters

stringthe byte data buffer value to write to the net stream

NKWriteVec3

Write a vector to the net stream

Parameters

vec3the vector value to write to the net stream

NKWriteQuat

Write a quaternion to the net stream

Parameters

quatthe quaternion value to write to the net stream

NKWriteGameObject

Write a game object reference to the buffer.  When received, the game object will be returned.  This uses network IDs to correspond game objects on both sides of the connection

Parameters

GameOjectthe game object to reference on the receiving side on the deserialization process

NKWriteObjectId

Write a game object’s network ID to the stream

Parameters

int64the 64-bit integer network ID

NetReader

Remote Client Only: Used to read values during the deserialization process with the net stream in the scripts.  This data must be read off in the same order that it was serialized by the server

Summary
Functions
NKReadBoolRead a boolean value from the stream
NKReadDoubleRead a double value from the stream
NKReadIntRead an integer value from the stream
NKReadStringRead a string value from the stream
NKReadBufferRead a byte data buffer from the stream
NKReadVec3Read a vector value from the stream
NKReadQuatRead a quaternion value from the stream
NKReadGameObjectRead a game object reference from the stream
NKReadObjectIdRead a game object’s id reference from the net stream

Functions

NKReadBool

Read a boolean value from the stream

Returns

boolthe bool value read from the net stream

NKReadDouble

Read a double value from the stream

Returns

doublethe double value read from the net stream

NKReadInt

Read an integer value from the stream

Returns

intthe int value read from the net stream

NKReadString

Read a string value from the stream

Returns

stringthe string value read from the net stream

NKReadBuffer

Read a byte data buffer from the stream

Returns

stringthe byte data buffer from the net stream

NKReadVec3

Read a vector value from the stream

Returns

vec3the vector value read from the net stream

NKReadQuat

Read a quaternion value from the stream

Returns

quatthe quaternion value read from the net stream

NKReadGameObject

Read a game object reference from the stream

Returns

GameObjectthe local game object representing the serialized game object from the server

NKReadObjectId

Read a game object’s id reference from the net stream

Returns

int64the 64-bit network ID value from the stream

NetStream

Base Class Onlyparent class for NetReader and NetWriter
Remote Client Only: Used to read values during the deserialization process with the net stream in the scripts.
Server Only: Used to write values during the serialization process to the net stream from the scripts.
Close