--------------------------------------- SceneDescriptorAsset::LoadFromMemory Deserialize a scene descriptor
| 91 | // Deserialize a scene descriptor |
| 92 | // |
| 93 | bool SceneDescriptorAsset::LoadFromMemory(std::vector<uint8> const& data) |
| 94 | { |
| 95 | m_Data = new SceneDescriptor(); |
| 96 | |
| 97 | // convert that data to a string and deserialize it as json |
| 98 | if (!core::serialization::DeserializeFromJsonString(core::FileUtil::AsText(data), *m_Data)) |
| 99 | { |
| 100 | LOG("SceneDescriptorAsset::LoadFromMemory > Failed to deserialize descriptor!", core::LogLevel::Warning); |
| 101 | delete m_Data; |
| 102 | m_Data = nullptr; |
| 103 | return false; |
| 104 | } |
| 105 | |
| 106 | return true; |
| 107 | } |
| 108 | |
| 109 | |
| 110 | } // namespace fw |
nothing calls this directly
no outgoing calls
no test coverage detected