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

Method SaveHeader

Source/Engine/Content/Assets/ModelBase.cpp:400–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398#if USE_EDITOR
399
400bool ModelBase::SaveHeader(WriteStream& stream) const
401{
402 // Basic info
403 static_assert(MODEL_HEADER_VERSION == 2, "Update code");
404 stream.Write(MODEL_HEADER_VERSION);
405 stream.Write(MinScreenSize);
406
407 // Materials
408 stream.Write(MaterialSlots.Count());
409 for (const auto& slot : MaterialSlots)
410 {
411 stream.Write(slot.Material.GetID());
412 stream.Write((byte)slot.ShadowsMode);
413 stream.Write(slot.Name, 11);
414 }
415
416 return false;
417}
418
419bool ModelBase::SaveHeader(WriteStream& stream, const ModelData& modelData)
420{

Callers

nothing calls this directly

Calls 5

GetIDMethod · 0.80
WriteMethod · 0.45
CountMethod · 0.45
WriteInt32Method · 0.45

Tested by

no test coverage detected