Skip to content
Snippets Groups Projects
Commit c7437a1d authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

warn if prototype file does not exist

parent 464dcba7
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,10 @@ namespace fggl::ecs3 {
void load_prototype_file( ecs3::World& world, data::Storage& storage, const std::string& name ) {
auto path = storage.resolvePath( data::Data, name );
if ( !std::filesystem::exists(path) ) {
debug::log(debug::Level::warning, "prototype file not found: {}", path.string());
return;
}
auto root = YAML::LoadFile( path.string().c_str() );
for (const auto& node : root["prefabs"] ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment