diff --git a/fggl/ecs3/prototype/loader.cpp b/fggl/ecs3/prototype/loader.cpp index 3a30d266e4ef7c5de29c11a1ee623eb83b5dbaf3..5c5ca6fd37143d8dd4785b7f7ca8b6a46d2f5cd4 100644 --- a/fggl/ecs3/prototype/loader.cpp +++ b/fggl/ecs3/prototype/loader.cpp @@ -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"] ) {