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

Method Deserialize

Source/Engine/Level/SceneObject.cpp:146–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void SceneObject::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
147{
148 // _id is deserialized by Actor/Script impl
149 // _parent is deserialized by Actor/Script impl
150 // _prefabID is deserialized by Actor/Script impl
151 DESERIALIZE_MEMBER(PrefabObjectID, _prefabObjectID);
152
153#if !COMPILE_WITHOUT_CSHARP
154 // Handle C# objects data serialization
155 if (EnumHasAnyFlags(Flags, ObjectFlags::IsManagedType))
156 {
157 auto* const v = SERIALIZE_FIND_MEMBER(stream, "V");
158 if (v != stream.MemberEnd() && v->value.IsObject() && v->value.MemberCount() != 0)
159 {
160 ManagedSerialization::Deserialize(v->value, GetOrCreateManagedInstance());
161 }
162 }
163#endif
164
165 // Handle custom scripting objects data serialization
166 if (EnumHasAnyFlags(Flags, ObjectFlags::IsCustomScriptingType))
167 {
168 auto* const v = SERIALIZE_FIND_MEMBER(stream, "D");
169 if (v != stream.MemberEnd() && v->value.IsObject() && v->value.MemberCount() != 0)
170 {
171 _type.Module->DeserializeObject(v->value, this, modifier);
172 }
173 }
174}

Callers

nothing calls this directly

Calls 6

EnumHasAnyFlagsFunction · 0.85
MemberEndMethod · 0.80
MemberCountMethod · 0.80
DeserializeObjectMethod · 0.80
DeserializeFunction · 0.50

Tested by

no test coverage detected