NetworkedBehaviour NetworkedObject NetworkingManager RpcMethod RpcMethod<T1> RpcMethod<T1,T2> RpcMethod<T1,T2,T3> RpcMethod<T1,T2,T3,T4> RpcMethod<T1,T2,T3,T4,T5> RpcMethod<T1,T2,T3,T4,T5,T6> RpcMethod<T1,T2,T3,T4,T5,T6,T7> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32> ResponseRpcMethod<TResult> ResponseRpcMethod<TResult,T1> ResponseRpcMethod<TResult,T1,T2> ResponseRpcMethod<TResult,T1,T2,T3> ResponseRpcMethod<TResult,T1,T2,T3,T4> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32> VisibilityDelegate SpawnDelegate ConnectionApprovedDelegate

BitWriter class

Namespace: MLAPI.Serialization

Assembly: MLAPI.dll

A BinaryWriter that can do bit wise manipulation when backed by a BitStream

Public Constructors

public BitWriter(Stream stream);

Creates a new BitWriter backed by a given stream

Parameters

Stream stream

The stream to use for writing


Public Methods

public void SetStream(Stream stream);

Changes the underlying stream the writer is writing to

Parameters

Stream stream

The stream to write to


public void WriteObjectPacked(object value);

Writes a boxed object in a packed format

Parameters

object value

The object to write


public void WriteSingle(float value);

Write single-precision floating point value to the stream

Parameters

float value

Value to write


public void WriteDouble(double value);

Write double-precision floating point value to the stream

Parameters

double value

Value to write


public void WriteSinglePacked(float value);

Write single-precision floating point value to the stream as a varint

Parameters

float value

Value to write


public void WriteDoublePacked(double value);

Write double-precision floating point value to the stream as a varint

Parameters

double value

Value to write


public void WriteRay(Ray ray);

Convenience method that writes two non-packed Vector3 from the ray to the stream

Parameters

Ray ray

Ray to write


public void WriteRayPacked(Ray ray);

Convenience method that writes two packed Vector3 from the ray to the stream

Parameters

Ray ray

Ray to write


public void WriteColor(Color color);

Convenience method that writes four non-varint floats from the color to the stream

Parameters

Color color

Color to write


public void WriteColorPacked(Color color);

Convenience method that writes four varint floats from the color to the stream

Parameters

Color color

Color to write


public void WriteColor32(Color32 color32);

Convenience method that writes four non-varint floats from the color to the stream

Parameters

Color32 color32

Color32 to write


public void WriteVector2(Vector2 vector2);

Convenience method that writes two non-varint floats from the vector to the stream

Parameters

Vector2 vector2

Vector to write


public void WriteVector2Packed(Vector2 vector2);

Convenience method that writes two varint floats from the vector to the stream

Parameters

Vector2 vector2

Vector to write


public void WriteVector3(Vector3 vector3);

Convenience method that writes three non-varint floats from the vector to the stream

Parameters

Vector3 vector3

Vector to write


public void WriteVector3Packed(Vector3 vector3);

Convenience method that writes three varint floats from the vector to the stream

Parameters

Vector3 vector3

Vector to write


public void WriteVector4(Vector4 vector4);

Convenience method that writes four non-varint floats from the vector to the stream

Parameters

Vector4 vector4

Vector to write


public void WriteVector4Packed(Vector4 vector4);

Convenience method that writes four varint floats from the vector to the stream

Parameters

Vector4 vector4

Vector to write


public void WriteRangedSingle(float value, float minValue, float maxValue, int bytes);

Write a single-precision floating point value to the stream. The value is between (inclusive) the minValue and maxValue.

Parameters

float value

Value to write

float minValue

Minimum value that this value could be

float maxValue

Maximum possible value that this could be

int bytes

How many bytes the compressed result should occupy. Must be between 1 and 4 (inclusive)


public void WriteRangedDouble(double value, double minValue, double maxValue, int bytes);

Write a double-precision floating point value to the stream. The value is between (inclusive) the minValue and maxValue.

Parameters

double value

Value to write

double minValue

Minimum value that this value could be

double maxValue

Maximum possible value that this could be

int bytes

How many bytes the compressed result should occupy. Must be between 1 and 8 (inclusive)


public void WriteRotationPacked(Quaternion rotation);

Writes the rotation to the stream.

Parameters

Quaternion rotation

Rotation to write


public void WriteRotation(Quaternion rotation, int bytesPerAngle); Obsolete

Writes the rotation to the stream.

Parameters

Quaternion rotation

Rotation to write

int bytesPerAngle

Unused


public void WriteRotation(Quaternion rotation);

Writes the rotation to the stream.

Parameters

Quaternion rotation

Rotation to write


public void WriteBit(bool bit);

Writes a single bit

Parameters

bool bit


public void WriteBool(bool value);

Writes a bool as a single bit

Parameters

bool value


public void WritePadBits();

Writes pad bits to make the underlying stream aligned


public void WriteNibble(byte value);

Write the lower half (lower nibble) of a byte.

Parameters

byte value

Value containing nibble to write.


public void WriteNibble(byte value, bool upper);

Write either the upper or lower nibble of a byte to the stream.

Parameters

byte value

Value holding the nibble

bool upper

Whether or not the upper nibble should be written. True to write the four high bits, else writes the four low bits.


public void WriteBits(ulong value, int bitCount);

Write s certain amount of bits to the stream.

Parameters

ulong value

Value to get bits from.

int bitCount

Amount of bits to write


public void WriteBits(byte value, int bitCount);

Write bits to stream.

Parameters

byte value

Value to get bits from.

int bitCount

Amount of bits to write.


public void WriteSByte(sbyte value);

Write a signed byte to the stream.

Parameters

sbyte value

Value to write


public void WriteChar(Char c);

Write a single character to the stream.

Parameters

Char c

Character to write


public void WriteUInt16(ushort value);

Write an unsigned short (UInt16) to the stream.

Parameters

ushort value

Value to write


public void WriteInt16(short value);

Write a signed short (Int16) to the stream.

Parameters

short value

Value to write


public void WriteUInt32(uint value);

Write an unsigned int (UInt32) to the stream.

Parameters

uint value

Value to write


public void WriteInt32(int value);

Write a signed int (Int32) to the stream.

Parameters

int value

Value to write


public void WriteUInt64(ulong value);

Write an unsigned long (UInt64) to the stream.

Parameters

ulong value

Value to write


public void WriteInt64(long value);

Write a signed long (Int64) to the stream.

Parameters

long value

Value to write


public void WriteInt16Packed(short value);

Write a signed short (Int16) as a ZigZag encoded varint to the stream.

Parameters

short value

Value to write


public void WriteUInt16Packed(ushort value);

Write an unsigned short (UInt16) as a varint to the stream.

Parameters

ushort value

Value to write


public void WriteCharPacked(Char c);

Write a two-byte character as a varint to the stream.

Parameters

Char c

Value to write


public void WriteInt32Packed(int value);

Write a signed int (Int32) as a ZigZag encoded varint to the stream.

Parameters

int value

Value to write


public void WriteUInt32Packed(uint value);

Write an unsigned int (UInt32) as a varint to the stream.

Parameters

uint value

Value to write


public void WriteInt64Packed(long value);

Write a signed long (Int64) as a ZigZag encoded varint to the stream.

Parameters

long value

Value to write


public void WriteUInt64Packed(ulong value);

Write an unsigned long (UInt64) as a varint to the stream.

Parameters

ulong value

Value to write


public void WriteByte(byte value);

Write a byte to the stream.

Parameters

byte value

Value to write


public void WriteString(string s, bool oneByteChars);

Writes a string

Parameters

string s

The string to write

bool oneByteChars

Whether or not to use one byte per character. This will only allow ASCII


public void WriteStringPacked(string s);

Writes a string in a packed format

Parameters

string s


public void WriteStringDiff(string write, string compare, bool oneByteChars);

Writes the diff between two strings

Parameters

string write

The new array

string compare

The previous array to use for diff

bool oneByteChars

Whether or not to use single byte chars. This will only allow ASCII characters


public void WriteStringPackedDiff(string write, string compare);

Writes the diff between two strings in a packed format

Parameters

string write

The new string

string compare

The previous string to use for diff


public void WriteByteArray(byte[] b, long count);

Writes a byte array

Parameters

byte[] b

The array to write

long count

The amount of elements to write


public void WriteByteArrayDiff(byte[] write, byte[] compare, long count);

Writes the diff between two byte arrays

Parameters

byte[] write

The new array

byte[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteShortArray(short[] b, long count);

Writes a short array

Parameters

short[] b

The array to write

long count

The amount of elements to write


public void WriteShortArrayDiff(short[] write, short[] compare, long count);

Writes the diff between two short arrays

Parameters

short[] write

The new array

short[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteUShortArray(ushort[] b, long count);

Writes a ushort array

Parameters

ushort[] b

The array to write

long count

The amount of elements to write


public void WriteUShortArrayDiff(ushort[] write, ushort[] compare, long count);

Writes the diff between two ushort arrays

Parameters

ushort[] write

The new array

ushort[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteCharArray(Char[] b, long count);

Writes a char array

Parameters

Char[] b

The array to write

long count

The amount of elements to write


public void WriteCharArrayDiff(Char[] write, Char[] compare, long count);

Writes the diff between two char arrays

Parameters

Char[] write

The new array

Char[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteIntArray(int[] b, long count);

Writes a int array

Parameters

int[] b

The array to write

long count

The amount of elements to write


public void WriteIntArrayDiff(int[] write, int[] compare, long count);

Writes the diff between two int arrays

Parameters

int[] write

The new array

int[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteUIntArray(uint[] b, long count);

Writes a uint array

Parameters

uint[] b

The array to write

long count

The amount of elements to write


public void WriteUIntArrayDiff(uint[] write, uint[] compare, long count);

Writes the diff between two uint arrays

Parameters

uint[] write

The new array

uint[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteLongArray(long[] b, long count);

Writes a long array

Parameters

long[] b

The array to write

long count

The amount of elements to write


public void WriteLongArrayDiff(long[] write, long[] compare, long count);

Writes the diff between two long arrays

Parameters

long[] write

The new array

long[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteULongArray(ulong[] b, long count);

Writes a ulong array

Parameters

ulong[] b

The array to write

long count

The amount of elements to write


public void WriteULongArrayDiff(ulong[] write, ulong[] compare, long count);

Writes the diff between two ulong arrays

Parameters

ulong[] write

The new array

ulong[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteFloatArray(float[] b, long count);

Writes a float array

Parameters

float[] b

The array to write

long count

The amount of elements to write


public void WriteFloatArrayDiff(float[] write, float[] compare, long count);

Writes the diff between two float arrays

Parameters

float[] write

The new array

float[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteDoubleArray(double[] b, long count);

Writes a double array

Parameters

double[] b

The array to write

long count

The amount of elements to write


public void WriteDoubleArrayDiff(double[] write, double[] compare, long count);

Writes the diff between two double arrays

Parameters

double[] write

The new array

double[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteArrayPacked(Array a, long count);

Writes an array in a packed format

Parameters

Array a

The array to write

long count

The amount of elements to write


public void WriteArrayPackedDiff(Array write, Array compare, long count);

Writes the diff between two arrays in a packed format

Parameters

Array write

The new array

Array compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteShortArrayPacked(short[] b, long count);

Writes a short array in a packed format

Parameters

short[] b

The array to write

long count

The amount of elements to write


public void WriteShortArrayPackedDiff(short[] write, short[] compare, long count);

Writes the diff between two short arrays in a packed format

Parameters

short[] write

The new array

short[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteUShortArrayPacked(ushort[] b, long count);

Writes a ushort array in a packed format

Parameters

ushort[] b

The array to write

long count

The amount of elements to write


public void WriteUShortArrayPackedDiff(ushort[] write, ushort[] compare, long count);

Writes the diff between two ushort arrays in a packed format

Parameters

ushort[] write

The new array

ushort[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteCharArrayPacked(Char[] b, long count);

Writes a char array in a packed format

Parameters

Char[] b

The array to write

long count

The amount of elements to write


public void WriteCharArrayPackedDiff(Char[] write, Char[] compare, long count);

Writes the diff between two char arrays in a packed format

Parameters

Char[] write

The new array

Char[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteIntArrayPacked(int[] b, long count);

Writes a int array in a packed format

Parameters

int[] b

The array to write

long count

The amount of elements to write


public void WriteIntArrayPackedDiff(int[] write, int[] compare, long count);

Writes the diff between two int arrays

Parameters

int[] write

The new array

int[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteUIntArrayPacked(uint[] b, long count);

Writes a uint array in a packed format

Parameters

uint[] b

The array to write

long count

The amount of elements to write


public void WriteUIntArrayPackedDiff(uint[] write, uint[] compare, long count);

Writes the diff between two uing arrays in a packed format

Parameters

uint[] write

The new array

uint[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteLongArrayPacked(long[] b, long count);

Writes a long array in a packed format

Parameters

long[] b

The array to write

long count

The amount of elements to write


public void WriteLongArrayPackedDiff(long[] write, long[] compare, long count);

Writes the diff between two long arrays in a packed format

Parameters

long[] write

The new array

long[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteULongArrayPacked(ulong[] b, long count);

Writes a ulong array in a packed format

Parameters

ulong[] b

The array to write

long count

The amount of elements to write


public void WriteULongArrayPackedDiff(ulong[] write, ulong[] compare, long count);

Writes the diff between two ulong arrays in a packed format

Parameters

ulong[] write

The new array

ulong[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteFloatArrayPacked(float[] b, long count);

Writes a float array in a packed format

Parameters

float[] b

The array to write

long count

The amount of elements to write


public void WriteFloatArrayPackedDiff(float[] write, float[] compare, long count);

Writes the diff between two float arrays in a packed format

Parameters

float[] write

The new array

float[] compare

The previous array to use for diff

long count

The amount of elements to write


public void WriteDoubleArrayPacked(double[] b, long count);

Writes a double array in a packed format

Parameters

double[] b

The array to write

long count

The amount of elements to write


public void WriteDoubleArrayPackedDiff(double[] write, double[] compare, long count);

Writes the diff between two double arrays in a packed format

Parameters

double[] write

The new array

double[] compare

The previous array to use for diff

long count

The amount of elements to write



Inherited Methods

public bool Equals(object obj);

Inherited from: object
Parameters

object obj


public int GetHashCode();

Inherited from: object

public Type GetType();

Inherited from: object

public string ToString();

Inherited from: object