Silence missing placeholder tile textures
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <frostbite2D/graphics/renderer.h>
|
||||
#include <frostbite2D/graphics/types.h>
|
||||
#include <frostbite2D/graphics/texture.h>
|
||||
#include <frostbite2D/resource/asset.h>
|
||||
|
||||
namespace ns_game {
|
||||
|
||||
@@ -174,6 +175,11 @@ StageRenderer::getTexture(const std::string& texturePath) const {
|
||||
return existing->second;
|
||||
}
|
||||
|
||||
if (!frostbite2D::Asset::get().exists(texturePath)) {
|
||||
textureCache_[texturePath] = nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
frostbite2D::Ptr<frostbite2D::Texture> texture =
|
||||
frostbite2D::Texture::loadFromFile(texturePath);
|
||||
if (texture) {
|
||||
|
||||
Reference in New Issue
Block a user