MCPcopy Create free account
hub / github.com/Illation/ETEngine / LoadFromPackage

Method LoadFromPackage

Engine/source/EtFramework/Config/BootConfig.cpp:37–51  ·  view source on GitHub ↗

----------------------------- BootConfig::LoadFromPackage Configuration for engine bootup that cannot be modified by the user

Source from the content-addressed store, hash-verified

35// Configuration for engine bootup that cannot be modified by the user
36//
37void BootConfig::LoadFromPackage(BootConfig& cfg, core::I_Package* const pkg)
38{
39 std::vector<uint8> rawData;
40 if (!pkg->GetEntryData(core::HashString(s_FileName.c_str()), rawData))
41 {
42 ET_ASSERT(false, "Failed to load boot config from package!");
43 return;
44 }
45
46 // convert that data to a string and deserialize it as json
47 if (!core::serialization::DeserializeFromJsonString(core::FileUtil::AsText(rawData), cfg))
48 {
49 ET_ASSERT(false, "Failed to deserialize boot config at '%s'!", s_FileName);
50 }
51}
52
53
54} // namespace fw

Callers

nothing calls this directly

Calls 2

HashStringClass · 0.85
GetEntryDataMethod · 0.45

Tested by

no test coverage detected