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

Method Save

Source/Editor/Cooker/Steps/CookAssetsStep.cpp:295–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295void CookAssetsStep::CacheData::Save(CookingData& data)
296{
297 PROFILE_CPU();
298 LOG(Info, "Saving incremental build cooking cache (entries count: {0})", Entries.Count());
299 auto file = FileWriteStream::Open(HeaderFilePath);
300 if (file == nullptr)
301 return;
302 DeleteMe<FileWriteStream> deleteFile(file);
303
304 // Serialize
305 file->WriteInt32(FLAXENGINE_VERSION_BUILD);
306 file->WriteInt32(Entries.Count());
307 file->WriteBytes(&Settings, sizeof(Settings));
308 for (auto i = Entries.Begin(); i.IsNotEnd(); ++i)
309 {
310 auto& e = i->Value;
311 file->Write(e.ID);
312 file->Write(e.TypeName);
313 file->Write(e.FileModified);
314 file->Write(e.FileDependencies.Count());
315 for (auto& f : e.FileDependencies)
316 {
317 file->Write(f.First, 10);
318 file->Write(f.Second);
319 }
320 }
321 file->Write(data.Tools->SaveCache(data, this));
322 file->WriteInt32(13);
323}
324
325bool CookAssetsStep::ProcessDefaultAsset(AssetCookData& options)
326{

Callers 11

ProcessDefaultAssetMethod · 0.45
PerformMethod · 0.45
CreateMethod · 0.45
InitializeMethod · 0.45
AddNewKeysMethod · 0.45
OnAddTagButtonClickedMethod · 0.45
OnAddStringClickedMethod · 0.45
UpdateMaterialMethod · 0.45

Calls 7

CountMethod · 0.45
WriteInt32Method · 0.45
WriteBytesMethod · 0.45
BeginMethod · 0.45
IsNotEndMethod · 0.45
WriteMethod · 0.45
SaveCacheMethod · 0.45

Tested by

no test coverage detected