21 static void SerializeAttributes(out notnull array<ref SCR_EditorAttributeStruct> outEntries,
SCR_EditorAttributeList attributeList =
null, Managed item =
null)
27 for (
int i = 0, count = attributeList.GetAttributesCount(); i < count; i++)
29 attribute = attributeList.GetAttribute(i);
30 if (!attribute.IsServer() || !attribute.IsSerializable())
33 var = attribute.ReadVariable(item,
null);
38 outEntries.Insert(entry);
41 entry.v0 = var.GetVector()[0];
42 entry.v1 = var.GetVector()[1];
43 entry.v2 = var.GetVector()[2];
52 static void DeserializeAttributes(notnull array<ref SCR_EditorAttributeStruct> entries,
SCR_EditorAttributeList attributeList =
null, Managed item =
null)
59 attribute = attributeList.GetAttribute(entry.id);
60 if (!attribute.IsSerializable())
64 attribute.WriteVariable(item, var,
null, -1);
73 static void LogAttributes(out notnull array<ref SCR_EditorAttributeStruct> entries,
SCR_EditorAttributeList attributeList =
null,
string prefix =
"")
75 Print(prefix +
" SCR_EditorAttributeStruct: " + entries.Count());
78 PrintFormat(prefix +
" %1: %2, %3, %4", attributeList.GetAttribute(entry.id).ClassName(), entry.v0, entry.v1, entry.v2);