MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Serialize

Method Serialize

Source/Engine/Scripting/ScriptingObject.cpp:38–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void SerializableScriptingObject::Serialize(SerializeStream& stream, const void* otherObj)
39{
40 SERIALIZE_GET_OTHER_OBJ(SerializableScriptingObject);
41
42#if !COMPILE_WITHOUT_CSHARP
43 // Handle C# objects data serialization
44 if (EnumHasAnyFlags(Flags, ObjectFlags::IsManagedType))
45 {
46 stream.JKEY("V");
47 if (other)
48 {
49 ManagedSerialization::SerializeDiff(stream, GetOrCreateManagedInstance(), other->GetOrCreateManagedInstance());
50 }
51 else
52 {
53 ManagedSerialization::Serialize(stream, GetOrCreateManagedInstance());
54 }
55 }
56#endif
57
58 // Handle custom scripting objects data serialization
59 if (EnumHasAnyFlags(Flags, ObjectFlags::IsCustomScriptingType))
60 {
61 stream.JKEY("D");
62 _type.Module->SerializeObject(stream, this, other);
63 }
64}
65
66void SerializableScriptingObject::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
67{

Callers

nothing calls this directly

Calls 5

EnumHasAnyFlagsFunction · 0.85
SerializeObjectMethod · 0.80
SerializeFunction · 0.70

Tested by

no test coverage detected