1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-03 19:11:41 +00:00

Fix Sprite2D error spam in exported project

This commit is contained in:
kobewi
2025-06-10 16:26:08 +02:00
parent cc9761c3f0
commit bf8a374a92

View File

@@ -481,7 +481,9 @@ void Sprite2D::_texture_changed() {
}
void Sprite2D::_emit_region_rect_enabled() {
emit_signal("_editor_region_rect_enabled");
if (Engine::get_singleton()->is_editor_hint()) {
emit_signal("_editor_region_rect_enabled");
}
}
void Sprite2D::_bind_methods() {
@@ -547,7 +549,7 @@ void Sprite2D::_bind_methods() {
}
Sprite2D::Sprite2D() {
#ifdef TOOLS_ENABLED
add_user_signal(MethodInfo("_editor_region_rect_enabled"));
#endif
if (Engine::get_singleton()->is_editor_hint()) {
add_user_signal(MethodInfo("_editor_region_rect_enabled"));
}
}