Skip to main content

Unity.Netcode.ByteUnpacker

Inheritance#

System.Object

ByteUnpacker

Inherited Members#

System.Object.Equals(System.Object)

System.Object.Equals(System.Object, System.Object)

System.Object.GetHashCode()

System.Object.GetType()

System.Object.MemberwiseClone()

System.Object.ReferenceEquals(System.Object, System.Object)

System.Object.ToString()

Syntax#
public static class ByteUnpacker

Methods#

ReadValueBitPacked(FastBufferReader, out Int16)#

Read a bit-packed 14-bit signed short from the stream. See BytePacker.cs for a description of the format.

Declaration#
public static void ReadValueBitPacked(FastBufferReader reader, out short value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.Int16valueThe value to read

ReadValueBitPacked(FastBufferReader, out Int32)#

Read a bit-packed 29-bit signed int from the stream. See BytePacker.cs for a description of the format.

Declaration#
public static void ReadValueBitPacked(FastBufferReader reader, out int value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.Int32valueThe value to read

ReadValueBitPacked(FastBufferReader, out Int64)#

Read a bit-packed 60-bit signed long from the stream. See BytePacker.cs for a description of the format.

Declaration#
public static void ReadValueBitPacked(FastBufferReader reader, out long value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.Int64valueThe value to read

ReadValueBitPacked(FastBufferReader, out UInt16)#

Read a bit-packed 15-bit unsigned short from the stream. See BytePacker.cs for a description of the format.

Declaration#
public static void ReadValueBitPacked(FastBufferReader reader, out ushort value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.UInt16valueThe value to read

ReadValueBitPacked(FastBufferReader, out UInt32)#

Read a bit-packed 30-bit unsigned int from the stream. See BytePacker.cs for a description of the format.

Declaration#
public static void ReadValueBitPacked(FastBufferReader reader, out uint value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.UInt32valueThe value to read

ReadValueBitPacked(FastBufferReader, out UInt64)#

Read a bit-packed 61-bit signed long from the stream. See BytePacker.cs for a description of the format.

Declaration#
public static void ReadValueBitPacked(FastBufferReader reader, out ulong value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.UInt64valueThe value to read

ReadValuePacked(FastBufferReader, out Color)#

Convenience method that reads four varint floats from the color from the stream

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out Color color)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
ColorcolorColor to read

ReadValuePacked(FastBufferReader, out Color32)#

Convenience method that reads four varint floats from the color from the stream

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out Color32 color)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
Color32colorColor to read

ReadValuePacked(FastBufferReader, out Quaternion)#

Reads the rotation from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out Quaternion rotation)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
QuaternionrotationRotation to read

ReadValuePacked(FastBufferReader, out Ray)#

Convenience method that reads two packed Vector3 from the ray from the stream

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out Ray ray)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
RayrayRay to read

ReadValuePacked(FastBufferReader, out Ray2D)#

Convenience method that reads two packed Vector2 from the ray from the stream

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out Ray2D ray2d)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
Ray2Dray2dRay2D to read

ReadValuePacked(FastBufferReader, out Boolean)#

Read a boolean from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out bool value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.BooleanvalueValue to read

ReadValuePacked(FastBufferReader, out Byte)#

Read a byte from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out byte value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.BytevalueValue to read

ReadValuePacked(FastBufferReader, out Char)#

Read a two-byte character as a varint from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out char c)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.CharcValue to read

ReadValuePacked(FastBufferReader, out Double)#

Read double-precision floating point value from the stream as a varint

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out double value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.DoublevalueValue to read

ReadValuePacked(FastBufferReader, out Int16)#

Read an usigned short (Int16) as a varint from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out short value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.Int16valueValue to read

ReadValuePacked(FastBufferReader, out Int32)#

Read a signed int (Int32) as a ZigZag encoded varint from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out int value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.Int32valueValue to read

ReadValuePacked(FastBufferReader, out Int64)#

Read a signed long (Int64) as a ZigZag encoded varint from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out long value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.Int64valueValue to read

ReadValuePacked(FastBufferReader, out SByte)#

Read a signed byte from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out sbyte value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.SBytevalueValue to read

ReadValuePacked(FastBufferReader, out Single)#

Read single-precision floating point value from the stream as a varint

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out float value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.SinglevalueValue to read

ReadValuePacked(FastBufferReader, out String)#

Reads a string in a packed format

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out string s)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.Strings

ReadValuePacked(FastBufferReader, out UInt16)#

Read an unsigned short (UInt16) as a varint from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out ushort value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.UInt16valueValue to read

ReadValuePacked(FastBufferReader, out UInt32)#

Read an unsigned int (UInt32) from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out uint value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.UInt32valueValue to read

ReadValuePacked(FastBufferReader, out UInt64)#

Read an unsigned long (UInt64) from the stream.

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out ulong value)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
System.UInt64valueValue to read

ReadValuePacked(FastBufferReader, out Vector2)#

Convenience method that reads two varint floats from the vector from the stream

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out Vector2 vector2)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
Vector2vector2Vector to read

ReadValuePacked(FastBufferReader, out Vector3)#

Convenience method that reads three varint floats from the vector from the stream

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out Vector3 vector3)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
Vector3vector3Vector to read

ReadValuePacked(FastBufferReader, out Vector4)#

Convenience method that reads four varint floats from the vector from the stream

Declaration#
public static void ReadValuePacked(FastBufferReader reader, out Vector4 vector4)
Parameters#
TypeNameDescription
FastBufferReaderreaderThe reader to read from
Vector4vector4Vector to read

ReadValuePacked\<TEnum>(FastBufferReader, out TEnum)#

Declaration#
public static void ReadValuePacked<TEnum>(FastBufferReader reader, out TEnum value)
where TEnum : struct, Enum
Parameters#
TypeNameDescription
FastBufferReaderreader
TEnumvalue
Type Parameters#
NameDescription
TEnum