Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

BitStream.Serialize

Serialize(value: bool): void;
void Serialize(bool value);
def Serialize(value as bool) as void
Serialize(value: char): void;
void Serialize(char value);
def Serialize(value as char) as void
Serialize(value: short): void;
void Serialize(short value);
def Serialize(value as short) as void
Serialize(value: int): void;
void Serialize(int value);
def Serialize(value as int) as void
Serialize(value: float, maxDelta: float = 0.00001F): void;
void Serialize(float value, float maxDelta = 0.00001F);
def Serialize(value as float, maxDelta as float = 0.00001F) as void
Serialize(value: Quaternion, maxDelta: float = 0.00001F): void;
void Serialize(Quaternion value, float maxDelta = 0.00001F);
def Serialize(value as Quaternion, maxDelta as float = 0.00001F) as void
Serialize(value: Vector3, maxDelta: float = 0.00001F): void;
void Serialize(Vector3 value, float maxDelta = 0.00001F);
def Serialize(value as Vector3, maxDelta as float = 0.00001F) as void
Serialize(value: NetworkPlayer): void;
void Serialize(NetworkPlayer value);
def Serialize(value as NetworkPlayer) as void
Serialize(viewID: NetworkViewID): void;
void Serialize(NetworkViewID viewID);
def Serialize(viewID as NetworkViewID) as void

Description

Serializes different types of variables.

Supported types are: bool, char, short, int, float, Quaternion, Vector3 and NetworkPlayer.

Note that Serialize(char) serializes one byte, so it will only work properly for characters in 0..255 range.