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

Method IsValid

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

Source from the content-addressed store, hash-verified

67}
68
69bool CookAssetsStep::CacheEntry::IsValid(bool withDependencies)
70{
71 AssetInfo assetInfo;
72 if (Content::GetAssetInfo(ID, assetInfo))
73 {
74 if (TypeName == assetInfo.TypeName)
75 {
76 if (FileSystem::GetFileLastEditTime(assetInfo.Path) <= FileModified)
77 {
78 bool isValid = true;
79 if (withDependencies)
80 {
81 for (auto& f : FileDependencies)
82 {
83 if (FileSystem::GetFileLastEditTime(f.First) > f.Second)
84 {
85 isValid = false;
86 break;
87 }
88 }
89 }
90 if (isValid)
91 return true;
92 }
93 }
94 }
95 return false;
96}
97
98CookAssetsStep::CacheEntry& CookAssetsStep::CacheData::CreateEntry(const JsonAssetBase* asset, String& cachedFilePath)
99{

Callers 4

SaveProjectMethod · 0.45
PerformMethod · 0.45
PerformMethod · 0.45
LoadMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected