MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / LoadImporter

Method LoadImporter

modules/tools/tool_core/src/asset/importer.cpp:24–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24SImporter* SImporterRegistryImpl::LoadImporter(const SAssetRecord* record, simdjson::ondemand::value&& object, skr_guid_t* pGuid)
25{
26 skr_guid_t type;
27 skr::json::Read(object["importerType"].value_unsafe(), type);
28 if (pGuid) *pGuid = type;
29 auto iter = loaders.find(type);
30 if (iter != loaders.end())
31 return iter->second.Load(record, std::move(object));
32 return nullptr;
33}
34uint32_t SImporterRegistryImpl::GetImporterVersion(skr_guid_t type)
35{
36 auto iter = loaders.find(type);

Callers 1

_ImportMethod · 0.80

Calls 5

ReadFunction · 0.50
moveFunction · 0.50
findMethod · 0.45
endMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected