Serialization general interface.
Serializer API works with:
- Note
- Serializer provides deep serialization (it serialize class memebers and their members etc). To avoid serialization of certain class variable, use NonSerialized attribute.
Usage:
class MyData
{
int m_id;
string m_dbg;
}
{
int statArray[4] = {6,9,2,3};
array<int> dynArray = {8,5,6,4};
MyData
data =
new MyData();
data.m_values = map<string, float>;
data.m_values.Insert(
"value1", 5.98);
data.m_values.Insert(
"value2", 4.36);
s.Write(10);
s.Write("Hello");
s.Write(statArray);
s.Write(dynArray);
}
{
int statArray[4];
array<int> dynArray;
int someInt;
string someString;
s.Read(someInt);
s.Read(someString);
s.Read(statArray);
s.Read(dynArray);
}
bool Deserialize(notnull IEntity owner, notnull GenericComponent component, notnull LoadContext context)
SCR_ChimeraCharacterClass ChimeraCharacterClass NonSerialized()] float m_fFaceAlphaTest=0
Get all prefabs that have the spawner data
ScriptBitReader Managed Serialize(inout void data, int sizeInBits)
Serializes the data pointer. The size is the amount of bits serialized.
Definition at line 58 of file Serializer.c.