summaryrefslogtreecommitdiff
path: root/scene/resources/mesh_library.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-27 21:10:09 +0100
committerGitHub <noreply@github.com>2020-02-27 21:10:09 +0100
commitf9d93ee819d216048e9dc69d4481be7802fb53da (patch)
tree8aa005887466a4a13a47fb056831061563ee9769 /scene/resources/mesh_library.cpp
parenteaf909dcf9acf40f64fbb5f7595a2902e563c96b (diff)
parent64fac9dd5d8ad360c783020a62a04c8434f5e143 (diff)
Merge pull request #36288 from Calinou/meshlibrary-allow-non-tools-use
Allow using `MeshLibrary.get_item_preview()` in non-editor builds again
Diffstat (limited to 'scene/resources/mesh_library.cpp')
-rw-r--r--scene/resources/mesh_library.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp
index ac016bec5d..fffd192348 100644
--- a/scene/resources/mesh_library.cpp
+++ b/scene/resources/mesh_library.cpp
@@ -29,7 +29,6 @@
/*************************************************************************/
#include "mesh_library.h"
-#include "core/engine.h"
bool MeshLibrary::_set(const StringName &p_name, const Variant &p_value) {
@@ -202,11 +201,6 @@ Transform MeshLibrary::get_item_navmesh_transform(int p_item) const {
Ref<Texture2D> MeshLibrary::get_item_preview(int p_item) const {
- if (!Engine::get_singleton()->is_editor_hint()) {
- ERR_PRINT("MeshLibrary item previews are only generated in an editor context, which means they aren't available in a running project.");
- return Ref<Texture2D>();
- }
-
ERR_FAIL_COND_V_MSG(!item_map.has(p_item), Ref<Texture2D>(), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
return item_map[p_item].preview;
}