| 36 | } |
| 37 | |
| 38 | void 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 | |
| 66 | void SerializableScriptingObject::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) |
| 67 | { |
nothing calls this directly
no test coverage detected