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

Method Serialize

Source/Engine/Terrain/TerrainChunk.cpp:300–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void TerrainChunk::Serialize(SerializeStream& stream, const void* otherObj)
301{
302 SERIALIZE_GET_OTHER_OBJ(TerrainChunk);
303
304 SERIALIZE_MEMBER(Offset, _yOffset);
305 SERIALIZE_MEMBER(Height, _yHeight);
306 SERIALIZE_MEMBER(Material, OverrideMaterial);
307
308 if (HasLightmap()
309#if USE_EDITOR
310 && !PrefabManager::IsCreatingPrefab
311#endif
312 )
313 {
314 stream.JKEY("LightmapIndex");
315 stream.Int(Lightmap.TextureIndex);
316
317 stream.JKEY("LightmapArea");
318 stream.Rectangle(Lightmap.UVsArea);
319 }
320}
321
322void TerrainChunk::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
323{

Callers

nothing calls this directly

Calls 3

HasLightmapFunction · 0.70
IntMethod · 0.45
RectangleMethod · 0.45

Tested by

no test coverage detected