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

Method Serialize

Source/Engine/Terrain/Terrain.cpp:711–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

709}
710
711void Terrain::Serialize(SerializeStream& stream, const void* otherObj)
712{
713 // Base
714 Actor::Serialize(stream, otherObj);
715
716 SERIALIZE_GET_OTHER_OBJ(Terrain);
717
718 SERIALIZE_MEMBER(LODBias, _lodBias);
719 SERIALIZE_MEMBER(ForcedLOD, _forcedLod);
720 SERIALIZE_MEMBER(LODDistribution, _lodDistribution);
721 SERIALIZE_MEMBER(ScaleInLightmap, _scaleInLightmap);
722 SERIALIZE_MEMBER(BoundsExtent, _boundsExtent);
723 SERIALIZE_MEMBER(CollisionLOD, _collisionLod);
724 SERIALIZE_MEMBER(PhysicalMaterials, _physicalMaterials);
725 SERIALIZE(Material);
726 SERIALIZE(DrawModes);
727
728 SERIALIZE_MEMBER(LODCount, _lodCount);
729 SERIALIZE_MEMBER(ChunkSize, _chunkSize);
730
731 if (_patches.HasItems())
732 {
733 stream.JKEY("Patches");
734 stream.StartArray();
735 for (int32 patchIndex = 0; patchIndex < _patches.Count(); patchIndex++)
736 {
737 stream.StartObject();
738 _patches[patchIndex]->Serialize(stream, other && other->_patches.Count() == _patches.Count() ? other->_patches[patchIndex] : nullptr);
739 stream.EndObject();
740 }
741 stream.EndArray();
742 }
743}
744
745void Terrain::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
746{

Callers 2

TestSerializeMethod · 0.45

Calls 7

SerializeFunction · 0.50
HasItemsMethod · 0.45
StartArrayMethod · 0.45
CountMethod · 0.45
StartObjectMethod · 0.45
EndObjectMethod · 0.45
EndArrayMethod · 0.45

Tested by 2

TestSerializeMethod · 0.36